Popsicles, what is wrong in this code? 3 out of 5 work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Popsicles, what is wrong in this code? 3 out of 5 work

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner input = new Scanner(System.in); int popsicles = input.nextInt(); int siblings = input.nextInt(); if(popsicles%siblings==0){ System.out.println ("give away");} else{ System.out.println ("eat them yourself");} //your code goes here } }

7th Jul 2020, 5:28 PM
Tom Dierckx
Tom Dierckx - avatar
1 Answer
0
Omg, didnt knew that mattered. Thx alot!
7th Jul 2020, 5:46 PM
Tom Dierckx
Tom Dierckx - avatar