0
Failed test 2 C++
Why second test doesn’t complete if even output is the same with waiting output? Here is cod: #include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = n; i>0; i--){ cout<<i<<endl; if (i%5 == 0 && i>0){ cout<<"Веер"<<endl; } n--; } return 0; }
6 odpowiedzi
+ 2
Your code outputs this for input "6":
6
5
Beep
4
3
2
1
So it outputs "5" and "Beep" where it should only output "Beep".
+ 1
The problem was with used language)
I wrote Beep in other language and program didn’t want to achieve it
0
Which task?
Post your code in the code playground and link it here so people can take a look and see what's going on.
0
I fix it
0
You need to create a countdown app. You are given a number N, print each number from N to 1 on a separate line. Also, when the current countdown number is a multiple of 5, the application should display "Beep". Example Input Data: 12 Sample Output Data: 12 eleven ten Beep nine
0
Thanks, but it’s okay