Question: for my first assigment i have to write an application that reads a monetary amount the fewest number of each bill and coin needed to
- public class Moneycale { * 3 = * Converts a monetary amount into fewest number of 1 @param args A reference to a string array contai 5 */ se public static void main(String[] args) { Scanner sc = new Scanner(System.in); double amount = sc.nextDouble(); int tenDollar (int) amount / 10; amount amount % 10; int fiveDollars (int) amount / 5; 2 I amount amount % 5; int oneDollars (int) amount / 1; amount = amount % 1; int newAmount (int) (amount * 100); 5 int quarters = (int) newAmount / 25;| newAmount = newAmount % 25; int dimes (int) newAmount / 10; 9 newAmount newAmount % 10; int nickels = (int) newAmount / 5; 1 3 5 0 4 5 6 7 // 1. Read a monetary amount. n.. hun bl.at Problems x @Javadoc Declaration rrors, 0 warnings, 0 others escription Resource
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
