0

POPSICLES in this test case 3 not done

#include <stdio.h> int main(int argc, char const *argv[]) { int siblings, popsicles; scanf("%d", &siblings); scanf("%d", &popsicles); if(popsicles >0 && siblings >0) { if (siblings %2==0 && popsicles %2==0) { printf("give away"); } else { printf("eat them yourself"); } } return 0; }

3rd Feb 2021, 5:01 PM
MAVADIYA DIVYESHKUMAR
MAVADIYA DIVYESHKUMAR - avatar
6 ответов
+ 1
No popsicles%siblings ==0. This should be the condition
3rd Feb 2021, 5:15 PM
Atul [Inactive]
+ 1
#include <stdio.h> int main(int argc, char const *argv[]) { int siblings, popsicles; scanf("%d", &siblings); scanf("%d", &popsicles); if (popsicles%siblings==0 ) { printf("give away"); } else { printf("eat them yourself"); } return 0; }
3rd Feb 2021, 5:21 PM
Atul [Inactive]
0
It's not done please help me
3rd Feb 2021, 5:19 PM
MAVADIYA DIVYESHKUMAR
MAVADIYA DIVYESHKUMAR - avatar
0
Check and compare it with your code
3rd Feb 2021, 5:22 PM
Atul [Inactive]
0
Done 🤘 Thanks atul bro
3rd Feb 2021, 5:38 PM
MAVADIYA DIVYESHKUMAR
MAVADIYA DIVYESHKUMAR - avatar
0
// popsicles & siblings #include <stdio.h> int main() { int siblings, popsicles; scanf("%d", &siblings); scanf("%d", &popsicles); //your code goes here if(siblings !=0){ if(popsicles !=0){ if(popsicles % siblings ==0){ printf ("give away"); }else{ printf ("eat them yourself"); } }else{ printf ("\n No popsicles to distribute."); } }else{ printf ("\nNo siblings. "); } return 0; } https://code.sololearn.com/cm7EYB51Q2CO/?ref=app
10th Dec 2021, 5:53 AM
Tutee
Tutee - avatar