- 3
Countdown code
Perfect question and perfect answer...! https://code.sololearn.com/coR0Y0JA4V5Q/?ref=app
2 odpowiedzi
- 1
What about that code? It works, so do you have any problems?
- 1
Check for the constraints b in beep should be in lowercase.
So
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
//your code goes here
do{
cout << n << endl;
if ((n % 5) == 0){
cout << "beep" << endl;
}
n--;
} while (n >= 1);
return 0;
}