Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Machine_Project_1 {
- public static void main(String[] args) {
- //Variable Declerations
- int moveColumn1 = 0, moveColumn2 = 0, moveColumn3 = 0;
- int tot = 0;
- Scanner scan = new Scanner(System.in);
- System.out.print("Please enter how many $5 bills you have: ");
- moveColumn1 = scan.nextInt();
- System.out.print("Please enter how many $10 bills you have: ");
- moveColumn2 = scan.nextInt();
- System.out.print("Please enter how many $20 bills you have: ");
- moveColumn3 = scan.nextInt();
- tot = moveColumn1 * 5 + moveColumn2 * 10 + moveColumn3 * 20;
- System.out.println("You have " + moveColumn1 + " Five dollar bills.");
- System.out.println("You have " + moveColumn2 + " Ten dollar bills.");
- System.out.println("You have " + moveColumn3 + " Twenty dollar bills.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement