import java.util.Scanner; public class PizzaLunchProgram { public static void main(String[] args) { int numEmployees, slices, total; // Find out how many people will be at the lunch System.out.print("How many employees will be at the lunch ? "); numEmployees = new Scanner(System.in).nextInt(); // Now ask each for the number of slices that they want and add to total total = 0; for (int i=1; i<=numEmployees; i++) { System.out.print("How many slices for employee " + i + " ? "); slices = new Scanner(System.in).nextInt(); total += slices; } // Now find out how many whole large pizzas to buy System.out.println("You need to order " + Math.ceil(total /8.0) + " large pizzas."); } }