Advertisement
MrsMcLead

Party

Feb 6th, 2014
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. public class Party
  2. {
  3.  public static void main(String[]args)
  4.  {
  5.   int partyGoers = 29;
  6.   int numOfHoagies;
  7.   int hoagieServes = 4;
  8.  
  9.  
  10.    
  11.   // System.out.println("How many people are going to be at your party?");
  12.   numOfHoagies = partyGoers/hoagieServes;
  13.    
  14.    
  15.    if(partyGoers % hoagieServes != 0)
  16.    {
  17.     numOfHoagies += 1;
  18.    }
  19.   System.out.println(numOfHoagies);
  20.  }
  21.  
  22.  
  23.  
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement