0 votes
343 views
in C program by (98.9k points)
edited

What is the equivalent code of the following statement in WHILE LOOP format?

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

printf ("%d\n", a * a);

 

1 Answer

0 votes
by (98.9k points)
edited by
 
Best answer
a=1;

while (a<=100) {

printf ("%d\n", a * a);

a++;

}

 

Related questions

0 votes
1 answer 492 views
+1 vote
1 answer 369 views
+1 vote
1 answer 393 views
0 votes
1 answer 415 views
0 votes
1 answer 360 views
+1 vote
1 answer 398 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

kyptec.lifestyle Earned a badge
kyptec.lifestyle Earned a badge
kyptec.lifestyle Earned a badge

5.7k questions

5.1k answers

108 comments

649 users

...