+ 3
Trying to solve the popsicles problem but it's showing test case 1 green and 3 and 5 red what do I do next to solve the problem
18 Respuestas
+ 5
This is the link to the task but we cannot see your code. Please try copying it to playground and link it then.
+ 3
Please link your code so we can help you!
+ 3
Specify the language too
+ 3
#include <stdio.h>
int main() {
int siblings, popsicles;
scanf("%d", &siblings);
scanf("%d", &popsicles);
siblings=4;
popsicles=8;
printf("give away");
return 0;
}
//Lisa ,🅰🅹 🅐🅝🅐🅝🅣 this is the code attempted my Samuel Affah . So I would like to suggest you to take user inputs. And use if else to check for the availability of popsicles
+ 2
Samuel Affah
How to check if you do not provide code?
+ 2
🅰🅹 🅐🅝🅐🅝🅣 Thanks I'm just realising now that should have put a condition
Thanks again
+ 1
Copy to playground, save, share link.
Like this for example:
https://code.sololearn.com/cUK6Jt1b0wUQ/?ref=app
+ 1
Check the playground,just search my name you'll see Lisa and atul helppl🅰🅹 🅐🅝🅐🅝🅣
0
Okay if the number of popsicles divided by children are completely divisible then print give away else eat them
0
Thank you so much Atul
0
Following you nowAtul
0
Samuel Affah
You have just printed "give away" without checking anything then how all test cases will be passed.
Problem says you have a box of popsicles and if you can divide equally to each children then print "give away" otherwise print "eat them yourself".
So how to check this you can use modulus operator (%) if reminder is 0 its mean you can divide equally.
0
Samuel Affah my pleasure
- 3
Please explain
- 3
How to language
- 3
Yes