How to convert the following for loop code to a while loop code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to convert the following for loop code to a while loop code

1. for (int x=50 ; x >0 ; x--) 2. { 3. cout << x<< count<< "second to go \n"; 4. }

1st Jan 2017, 12:44 PM
fatinfarhanah
2 Answers
+ 1
int x = 50; while(x>0) { cout << x << count << " second to go \n"; x--; }
1st Jan 2017, 1:00 PM
Andreas K
Andreas K - avatar
0
tq so much
1st Jan 2017, 3:03 PM
fatinfarhanah