0
Coutdown
I couldnt code the coutdown question... It always giving me wrong out put..... I need the "Beep" before the number My code while(n>0){ cout<<n<<"\n"; n--; if(n%5==0){ cout<<"Beep \n"; } }
3 Answers
+ 1
Perform the check before decrementing the value of *n*
Here is a fix đ
https://code.sololearn.com/cK48SSnRgQGX/?ref=app
0
Thanks alot, I took a weak to reach this code..
But coudnt figure how to solve that....
U r awesome... |:^)
0
Or use for loop anyways both are same I was talking about
for(i=n;i>0;i--){
cout << n<<endl;
If(n%5==0)
cout << "Beep\n";
}
Well there are too many methods