0
Still one test case is wrong..please help me in this...
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner input = new Scanner(System.in); int siblings = input.nextInt(); int popsicles = input.nextInt(); if(siblings%2==0&&popsicles%2==1) { System.out.println("eat them yourself"); } else { System.out.println("give away"); } //your code goes here } }
4 Respuestas
+ 4
Instead of writing
//If(siblings.........==1)
Try this
if(popsicles%siblings==0)
+ 2
Try
Scanner input = new Scanner(System.in);
And yet your question seems to be incomplete.
Can we know which question you are talking about.
0
Sorry I updated it...
0
It worked for this popsicles%siblings==0
Thannk you ananya