0

for (n;n>0;n--) { cout<<n<<endl; if (n %5==0) { cout<<"beep"<<endl; } }

How can I make it more simpler

29th Aug 2022, 3:21 PM
Anapey Gabriel
2 Réponses
+ 1
Before making it simpler, make it does what it was meant to do first. I'm talking about the "Beep" that you spelled "beep". One different letter matters when it comes to tasks like these. Next time please, avoid writing code in the post title, a brief of the question should go there instead.
29th Aug 2022, 3:27 PM
Ipang
0
You need to make a countdown app. Given a number N as input, output numbers from N to 1 on separate lines. Also, when the current countdown number is a multiple of 5, the app should output "Beep". Sample Input: 12
29th Aug 2022, 3:22 PM
Anapey Gabriel