Advertisement
Guest User

Untitled

a guest
May 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Machine_Project_1 {
  4.     public static void main(String[] args) {
  5.         //Variable Declerations
  6.         int moveColumn1 = 0, moveColumn2 = 0, moveColumn3 = 0;
  7.         int tot = 0;
  8.        
  9.         Scanner scan = new Scanner(System.in);
  10.        
  11.         System.out.print("Please enter how many $5 bills you have: ");
  12.         moveColumn1 = scan.nextInt();
  13.         System.out.print("Please enter how many $10 bills you have: ");
  14.         moveColumn2 = scan.nextInt();
  15.         System.out.print("Please enter how many $20 bills you have: ");
  16.         moveColumn3 = scan.nextInt();
  17.        
  18.         tot = moveColumn1 * 5 + moveColumn2 * 10 + moveColumn3 * 20;
  19.        
  20.         System.out.println("You have " + moveColumn1 + " Five dollar bills.");
  21.         System.out.println("You have " + moveColumn2 + " Ten dollar bills.");
  22.         System.out.println("You have " + moveColumn3 + " Twenty dollar bills.");
  23.     }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement