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; }

22nd Apr 2022, 8:02 AM
Emma
Emma - avatar
1 Antwort
+ 3
Cause you forgot the brackets around the while statement
22nd Apr 2022, 8:12 AM
Slick
Slick - avatar