how can restart the program after running without exit the program? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

how can restart the program after running without exit the program?

19th Sep 2016, 2:27 PM
AHMAD
AHMAD - avatar
2 ответов
+ 1
Use infinity loop. obviously with a break for example : int x; while(1) { cin >> x; cout << x << endl; if (x ==0) break; } here, you can input x many times. You can exit the program by inputting 0 :)
19th Sep 2016, 2:51 PM
Mosiur Rahman
Mosiur Rahman - avatar
+ 1
than you so much
19th Sep 2016, 3:15 PM
AHMAD
AHMAD - avatar