+ 1
I made a code for countdown project in c++ but the test case it's show code is not correct if anybody know please help me.
I try to solving the countdown program in c++ and I make code for it.The test case,1,2,4 are not work correct.i don't know why are they incorrect.if anybody know please reply it.here is my code: #include <iostream> using namespace std; int main() { int n; cin >> n; cout<<n<<endl; while(n>1){ if (n%5==0) cout<<"beep"<<endl; n--; cout<<n<<endl; } }
3 Réponses