//
* Write a program that reads how much change is
due (in cents) and writes out that amount as dollars, quarters, dimes, nickels,
and pennies. Use integers for all variables and all arithmetic. Run 3 test cases,
including the one shown in the exercise. change this license header, choose
License Headers in Project Properties.
*/
package findingchange;
import java.util.Scanner ;
/**
*
* @author Peter Guthrie
*/
public class Findingchange {
/**
*/
public static void main(String[] args) {
Scanner scan = new Scanner (System.in);
int dollars = 100 ;// 100 goes into cents but how do I find quarters?
int quarters = 25;
int dimes = 10;
int nickels = 5;
System.out.println("Your change:" + cents/dollars //then What?);
}
}
System.out.println("Please enter cents value");
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I figured it out
package findingchange;
import java.util.Scanner ;
/**
*
* @author Peter Guthrie
*/
public class Findingchange {
}