Can anyone please tell me why am i failing 5th testcase? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anyone please tell me why am i failing 5th testcase?

#include <stdio.h> int main() { int yard; scanf("%d",&yard); int x=1; if(yard > 10){ printf("High Five"); } else if(yard==0){ printf("shh"); } else if(yard>0 && yard<=10){ do { printf("Ra!"); x++; }while(x <= yard); } return 0; }

6th Nov 2020, 9:23 PM
Shaik Nadeem Sameer
Shaik Nadeem Sameer - avatar
2 Answers
+ 10
Shaik Nadeem Sameer please read the statement carefully "shh" should be return when yard value less than 1 else if(yard<1){ printf("shh"); } it should fix the issue in test case.
6th Nov 2020, 9:35 PM
GAWEN STEASY
GAWEN STEASY - avatar
0
GAWEN STEASY thanks alot. It worked. Experts like you are saviors to newbies like me
7th Nov 2020, 9:11 PM
Shaik Nadeem Sameer
Shaik Nadeem Sameer - avatar