Home / Questions / Write a loop statement that will show the following output:112123123412345
Explanatory Question

Write a loop statement that will show the following output:112123123412345

👁 9,455 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

 
for (a=1; a<=5; i++) {
for (b=1; b<=a; b++)
printf("%d",b);
printf("");
}