0 votes
487 views
in C program by (1.7k points)
edited

Write a loop statement that will show the following output:

1

12

123

1234

12345

1 Answer

0 votes
by (1.7k points)
selected by
 
Best answer
for (a=1; a<=5; i++) {

for (b=1; b<=a; b++)

printf("%d",b);

printf("\n");

}

 

Related questions

0 votes
1 answer 338 views
+1 vote
1 answer 388 views
+1 vote
1 answer 365 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

Recent Badges

MrRam Earned a badge
Ritesh Maurya Earned a badge
Ritesh Maurya Earned a badge

5.7k questions

5.1k answers

108 comments

648 users

...