- 3

Give me a perfect example of do while loop in real life sinario

Give me a perfect example of do while loop in real life sinario

30th Apr 2017, 10:24 AM
Yash Katyayan
Yash Katyayan - avatar
5 Antworten
+ 16
do { wash_hands(); } while (hands_are_dirty()); do { eat(); } while (still_hungry()); do { brush_teeth(); } while (cabbage_still_stuck_in_between_teeth());
30th Apr 2017, 10:36 AM
Hatsy Rei
Hatsy Rei - avatar
+ 14
do { not_ask(); } while(question=Stupid); --jokin bruh!
30th Apr 2017, 11:15 AM
Min Somai
Min Somai - avatar
+ 5
fn main() { let mut alive = true; loop { breathe(); if dead() { let mut alive = false; } } } fn breathe() { let mut alive = true; }
30th Apr 2017, 10:37 AM
Complex
Complex - avatar
+ 3
I normally use that if I would like ask the user if he/she wishes to continue or exit the program do { . . . cout << "Do you wish to continue?"; cin >> response; }while(*your condition*)
1st May 2017, 12:06 AM
Krishneel Nair
Krishneel Nair - avatar
0
22nd Oct 2020, 5:14 AM
Manish Patidar
Manish Patidar - avatar