import java.util.Scanner; class p1 { static int CONES_PER_GALLON = 24; public static void main(String[] args) { int cones = 0; int gallons = 0; Scanner myScanner = new Scanner(System.in); // get the number of cones System.out.printf("How many cones will you sell? "); cones = myScanner.nextInt(); System.out.println(); // compute the number of gallons needed. gallons = (int) Math.ceil(cones/(float)CONES_PER_GALLON); System.out.printf("You will need %d gallons of ice cream\n",gallons); } }