0
He help with c++ code
Please help finish code I need to make a countdown and if the number is a multiple of 5 it says “Beep” after reporting the number. int main() { int n; cin >> n; for(n;n>=0;n--){ cout<<n<<endl; int y; y=n--%5; if(y==0){ cout<<"Beep"<<endl; } } return
4 Respuestas
+ 1
This will be cleared code and without warnings:
https://code.sololearn.com/c0k7xG5fMG5o/?ref=app
+ 1
thanks. what if i still want it to post the number thats a multiole of 5. not replace 5, 10, 15 with beep but post the number then the line below beep.
15
beep
14
13
+ 1
No problem Dane . Please see my updated code.
0
You're unnecessarily subtracting from n in y= n-- % 5