+ 2
Please tell me what is the mistake, I am not able to insert Beep| c++ second in session challenge countdown
#include <iostream> using namespace std; int main() { int n,x; cin >> n; while(n>0){ cout<<n<<endl; x=n%5; if(x=0) cout<<"Beep"; n--; } return 0; }
1 Odpowiedź
+ 7
You used the assignment operator = inside the if-statement, but if you want to compare two values, you need to use the comparison operator == instead.