0 votes
241 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

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!

5.7k questions

5.1k answers

108 comments

535 users

...