+ 2
My popsicles code challenge test 3,4,5 are hidden? Tell me a reason?
Popsicle code challenge
10 Antworten
+ 19
#include <stdio.h>
int main ()
{
int sibs, pops;
scanf("%d %d", &sibs, &pops); getchar ();
if (pops%sibs==0) printf ("give away");
else printf ("eat them yourself");
return 0;
}
+ 5
Your code might be lacking something.
It would be better if you could paste it here
+ 1
N.A.W.Wickramasinghe just check if the n
o of popsicles gets equally distributed among siblings ,thats it.
Try using other types of if loop.
+ 1
That code doesn't look like it tries to answer the challenge at all, but Cheyat is right, they hide them so people don't cheat and legitimately account for all possible inputs within their code that gives appropriate outputs
+ 1
Only test 1 and 2 are open. Other test options are always hidden. In every code coach problem
0
#include <stdio.h>
int main() {
int siblings, popsicles;
scanf("%d", &siblings);
scanf("%d", &popsicles);
if(siblings<10){
printf("eat them yourself");
}
if(popsicles>10){
if(popsicles<100){
printf("give away");
}
}
//your code goes here
return 0;
}
This is my code. But test 3,4,5 are hidden.
0
This code is in c language.
0
Thanks for all guys.👍
0
Thanks for all guys. I were successful that challenge.👍👌
- 1
Those cases are hidden on purpose and for everyone to prevent users from cheating by seeing the input and using if-else statement to give output.
Have a good day,
Ćheyat