+ 2

My popsicles code challenge test 3,4,5 are hidden? Tell me a reason?

Popsicle code challenge

28th Jun 2020, 4:52 AM
N.A.W.Wickramasinghe
N.A.W.Wickramasinghe - avatar
10 Respostas
+ 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; }
28th Jun 2020, 5:54 AM
➙₄₳Ⱡ₳₭➙
➙₄₳Ⱡ₳₭➙ - avatar
+ 5
Your code might be lacking something. It would be better if you could paste it here
28th Jun 2020, 4:56 AM
Nilesh
Nilesh - avatar
+ 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.
28th Jun 2020, 5:14 AM
Varun N
Varun N - avatar
+ 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
28th Jun 2020, 10:10 PM
Andrew Mehrle
Andrew Mehrle - avatar
+ 1
Only test 1 and 2 are open. Other test options are always hidden. In every code coach problem
29th Jun 2020, 1:30 PM
Mir Abir Hossain
Mir Abir Hossain - avatar
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.
28th Jun 2020, 4:57 AM
N.A.W.Wickramasinghe
N.A.W.Wickramasinghe - avatar
0
This code is in c language.
28th Jun 2020, 4:58 AM
N.A.W.Wickramasinghe
N.A.W.Wickramasinghe - avatar
0
Thanks for all guys.👍
28th Jun 2020, 6:51 AM
N.A.W.Wickramasinghe
N.A.W.Wickramasinghe - avatar
0
Thanks for all guys. I were successful that challenge.👍👌
28th Jun 2020, 7:01 AM
N.A.W.Wickramasinghe
N.A.W.Wickramasinghe - avatar
- 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
28th Jun 2020, 12:44 PM
Saphal Poudyal
Saphal Poudyal - avatar