+ 2
how can restart the program after running without exit the program?
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 :)
+ 1
than you so much