0

guys i need your help pls

#include <stdio.h> int main() { int siblings =9, popsicles =3; scanf("%d", &siblings); scanf("%d", &popsicles); if (if popsicles = siblings ) printf ("%d give them away"); Else (popsicles = < siblings ) printf ("eat them yourself"); return 0; }

29th Jan 2022, 1:56 PM
MR KINGSHOW
MR KINGSHOW - avatar
3 Antworten
+ 1
//you need to learn about syntaxes more.. //ans also about your logic #include <stdio.h> int main() { int siblings , popsicles; scanf("%d", &siblings); scanf("%d", &popsicles); if ( popsicles % siblings == 0 ) printf ("give away"); else printf ("eat them yourself"); return 0; }
29th Jan 2022, 2:05 PM
Jayakrishna 🇮🇳
0
int siblings, popsicles; scanf("%d", &siblings); scanf("%d", &popsicles); printf("%s", popsicles%siblings==0 ? "give away" : "eat them yourself"); // good luck
29th Jan 2022, 2:05 PM
SoloProg
SoloProg - avatar
0
// try if (popsicles%siblings==0) // or if (popsicles==siblings) printf ("give away"); else printf ("eat them yourself");
29th Jan 2022, 2:11 PM
SoloProg
SoloProg - avatar