+ 1
Cheer Creator
#include<stdio.h> int main() { int n,i; scanf("%d",&n); if(n>0 && n<10) { for(i=1;i<=n;i++) printf("Ra!"); } else if(n>=10) { printf("High Five"); } else { printf("shh"); } return 0; } It passed Test Cases 1-2-3-5 but not 4th one what's wrong in this code please tell me Thank you in Advance!
1 Antwort
+ 3
"...if they move forward 10 yards or less, you say 'Ra!'..."
But in your code if they move exactly 10 yards you are printing "High Five".