THIS IS MEANT TO BE IN JAVA So far we've learned variables, branches, loops, and some array. The assignment is: Write a program with total change amount in pennies as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies. Ex: If the input is: 0 the output is: No change Ex: If the input is: 45 the output is: 1 Quarter 2 Dimes Please show the end result and why you added what you added. This is what I have so far: import java.util.Scanner; public class LabProgram { public static void main(String[] args) { } }
THIS IS MEANT TO BE IN JAVA
So far we've learned variables, branches, loops, and some array. The assignment is:
Write a program with total change amount in pennies as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies.
Ex: If the input is:
0
the output is:
No change
Ex: If the input is:
45
the output is:
1 Quarter 2 Dimes
Please show the end result and why you added what you added. This is what I have so far:
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
}
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images