0

what is mistake in this code

#include <stdio.h> int main() { int siblings, popsicles; scanf("%d", &siblings); scanf("%d", &popsicles); //your code goes here if (popsicles%siblings==0) printf ("giveaway"); { else { printf {"eat yourself"}; } } }

7th Mar 2020, 4:43 PM
neelu agrawal
3 ответов
+ 3
#include <stdio.h> int main() { int siblings, popsicles; scanf("%d", &siblings); scanf("%d", &popsicles); //your code goes here if (popsicles%siblings==0){ printf ("giveaway"); } else{ printf("eat yourself"); } }
8th Mar 2020, 10:07 AM
Ketul Patel
Ketul Patel - avatar
0
if (popsicles%siblings==0) { printf ("giveaway"); } else { printf {"eat yourself"}; } Try this
7th Mar 2020, 5:02 PM
Wardy Spirit
Wardy Spirit - avatar
0
Wrong use of braces. #include <stdio.h> int main() { int siblings, popsicles; scanf("%d", &siblings); scanf("%d", &popsicles); //your code goes here if (popsicles%siblings==0) printf ("giveaway"); else printf("eat yourself"); }
7th Mar 2020, 5:02 PM
andriy kan
andriy kan - avatar