+ 1

Popsicles Challenge - 3/5 failed test, can someone tell me what's wrong with my code?

Here's my try 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(); //your code goes here int i = popsicles % siblings ; if (i==0) { System.out.println("giveaway"); } else { System.out.println("eat them yourself"); } } }

3rd May 2020, 4:39 AM
Mary Joy Yee
Mary Joy Yee - avatar
2 Antworten
+ 3
Hey there Mary Joy Yee, you are using the wrong string :)) Write this : System.out.println("give away"); That is put a space in between!
3rd May 2020, 4:48 AM
Arb Rahim Badsa
Arb Rahim Badsa - avatar
+ 1
3rd May 2020, 4:53 AM
Mary Joy Yee
Mary Joy Yee - avatar