0 votes
258 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 125 views
+1 vote
1 answer 136 views
+1 vote
1 answer 128 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!

5.7k questions

5.1k answers

108 comments

561 users

...