Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Party
- {
- public static void main(String[]args)
- {
- int partyGoers = 29;
- int numOfHoagies;
- int hoagieServes = 4;
- // System.out.println("How many people are going to be at your party?");
- numOfHoagies = partyGoers/hoagieServes;
- if(partyGoers % hoagieServes != 0)
- {
- numOfHoagies += 1;
- }
- System.out.println(numOfHoagies);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement