0
Why does it shows endless 10 and the decrement "x--" doesn't work?
#include <iostream> using namespace std; int main() { int x=10; while (x>=0) cout<<x<<endl; x--; return 0; }
1 Réponse
+ 3
Cause you forgot the brackets around the while statement
#include <iostream> using namespace std; int main() { int x=10; while (x>=0) cout<<x<<endl; x--; return 0; }