+ 2
How can I print "Beep" after (n%5==0)...?
int main() { while(true){ int n; cin >> n; //your code goes here while(n > 0){ cout << n <<endl; n--; if(n % 5 == 0) cout<<"Beep\n";
2 Answers
+ 2
Decrement n in the end of the while loop instead of in-between first output and if-statement
+ 2
Thank you Ms.lisa...đ