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; }
6 Respostas
+ 1
No popsicles%siblings ==0. This should be the condition
+ 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;
}
0
It's not done please help me
0
Check and compare it with your code
0
Done 🤘
Thanks atul bro
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