0
Countdown in cpp
I've completed this problem compiler shows some error I didn't able to seen bug if you see any error in my program please let me know #include <iostream> using namespace std; int main() { int n; cin >> n; for(;n<=1;n--){ if(n % 5 == 0){ cout<<"Beep"<<endl; } } return 0; }
5 Réponses
+ 6
Ramesh ,
we need to have more Information about the task from you. please mention the lesson / exercise number.
thanks!
+ 5
Hello, please include your code in the question. We can't help if we can't see the code.
https://www.sololearn.com/Content-Creation-Guidelines/
+ 3
Where is your code? You didn't show us anything. Then how can we find errors in your code?
+ 2
Sorry I forget to mention my code ,this is my code
+ 2
Ramesh the condition inside your if block which is inside your for loop, is wrong. It should be >= instead of <=. Refer the below code where I've shown it on practise
https://code.sololearn.com/c0ASTxfyOqOJ/?ref=app