Rewrite as while , do while and for loop | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

Rewrite as while , do while and for loop

i=2; start: cout <<i; i+=2; if (i <51)goto start; cout <<"thank you ";

13th Feb 2018, 4:55 AM
Sree Saradhaa
Sree Saradhaa - avatar
1 Answer
+ 2
i=2 while(i<51) { cout<<i; i+=2;} cout<<"Thank you"; for(i=2; i<51; i++) cout<< i; cout<<"Thank you"; do {cout<<i; i+=2;) while(i<51);
13th Feb 2018, 7:01 AM
‎ ‏‏‎Anonymous Guy