How can we replace the following statement by using WHILE Loop?
1 2 | for (x=1; x<=100; x++) printf ("%d ", x *x ); |
Answer:
1 2 3 4 5 6 7 | x=1; while (x<=100) { printf ("%d ", x * x); x++; } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.