0

Code coach Cheer creator?

Why did the second way pass all the cases and not the first? https://code.sololearn.com/c8e9xPgWVl1P/?ref=app

25th Aug 2020, 5:31 PM
Roderick Davis
Roderick Davis - avatar
7 Réponses
+ 4
Roderick Davis it's working fine. mistakes: High Five is separated by only one space. You forgot to declare x data type if(yards > 10){ System.out.println("High Five"); }else if(yards < 1){ System.out.println("shh"); }else{ for(int x = 0; x<yards;x++){ System.out.print("Ra!"); } }
25th Aug 2020, 5:41 PM
minirkk
minirkk - avatar
+ 2
rkk it was the extra spaces, thanks 👍🏾
25th Aug 2020, 5:47 PM
Roderick Davis
Roderick Davis - avatar
+ 1
rkk lol it passed 4/5 cases tho so its clearly the order of the if-elseif structure. Which is not making sense to me
25th Aug 2020, 5:36 PM
Roderick Davis
Roderick Davis - avatar
+ 1
Roderick Davis You're welcome! 😇
25th Aug 2020, 5:50 PM
minirkk
minirkk - avatar
0
because the first one is wrong. 😅
25th Aug 2020, 5:33 PM
minirkk
minirkk - avatar
25th Aug 2020, 5:41 PM
Roderick Davis
Roderick Davis - avatar
8th Nov 2020, 8:11 PM
Raúl Lobo
Raúl Lobo - avatar