+ 1

Cheer Creator C error (solved)

Hello, It gets an erorr for 1 of 5 tests but I can't understand why. I don't see any problem. Please help me! #include <stdio.h> int main() { int yards, i; scanf ("%d", &yards); if (yards > 10) { printf ("High five"); } else if (yards < 1) { printf ("shh"); } else { for (i=0; i < yards; i++) { printf ("Ra!"); } } return 0; }

10th Sep 2021, 6:58 PM
Madalina Peter
Madalina Peter - avatar
3 Respostas
+ 3
In cp question you need to read constraints becz if u dont follow them then it may cause test failed
11th Sep 2021, 4:52 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 3
I've understood that my error was because a small inattention. But for the next I will pay more attention on such details. Thank you very much for your help!
11th Sep 2021, 6:27 AM
Madalina Peter
Madalina Peter - avatar
+ 2
Thank you so much for your help. I didn't see the difference.
10th Sep 2021, 7:13 PM
Madalina Peter
Madalina Peter - avatar