Advertisement
Guest User

Untitled

a guest
Sep 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class cooking {
  4.  
  5. public static void main(String[] args) {
  6. Scanner input = new Scanner(System.in);
  7. double sugar = 1.5/48;
  8. double butter = 1.0/48;
  9. double flour = 2.75/48;
  10. System.out.println("How many Cookies?: ");
  11. int cookies = input.nextInt();
  12.  
  13. System.out.println("You will need: \n" + (sugar*cookies) +" cup of sugar \n" + (butter*cookies) + " cup of butter \n" + (flour*cookies) + " cup of flour");
  14.  
  15.  
  16.  
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement