C++ Countdown problem saying it's wrong despite correct code.
Hi, I'm stuck on the C++ Countdown Problem. My Output and Sample Output completely match and the code works but it says it's wrong. Here is my code: #include <iostream> using namespace std; int main() { int n; cin >> n; //your code goes here while(n > 0) { cout << n << endl; if (n % 5 == 0) { cout << "beep" << endl; } n--; } return 0; } Here is my output: 15 beep 14 13 12 11 10 beep 9 8 7 6 5 beep 4 3 2 1 Here is sample output: 15 Beep 14 13 12 11 10 Beep 9 8 7 6 5 Beep 4 3 2 1 Here is My output no. 2: 11 10 beep 9 8 7 6 5 beep 4 3 2 1 Here is sample output 2: 11 10 Beep 9 8 7 6 5 Beep 4 3 2 1 I am unable to see test cases 3, 4 and 5 but 3 and 5 say they are correct but 1, 3 and 4 say it's wrong. Any help appreciated