+ 1
What is wrong in this code for 'Cheer creator'?
#include <stdio.h> int main() { int yard,i; scanf("%d",&yard); if(yard>10) { printf("High five"); for(i=0;i<yard;i++) { printf("Ra!"); } } if(yard<1){ printf("shh"); } if(yard>1 && yard<=10) { for(i=0;i<yard;i++) { printf("Ra!"); } } return 0; }
6 ответов
+ 1
It should not print "Ra!" if yard > 10.
Also, it fails to print "Ra!" when yard == 1.
+ 1
Brian in 7th line i use to print Ra if yard >10
+ 1
Yes, Shivam Mishra, but the instructions are to only print "High five" if yard > 10. Remove that loop.
Also correct the condition so that it includes yard == 1 when printing "Ra!".
+ 1
It is not working bro
+ 1
Thank u all