the program works and all but i dont want my qts,dms,nks,pns to be in a decimal form i keep changing it but then it doesnt wotk can anybody help me pleasee i really appreciate it am not sure how to improve it..thank you so much....
import java.util.Scanner;
public class Program1
{
public static void main(String [] args)
{
double purchase,change,quarters,dimes,nickels,pennies;
Scanner keyboard=new Scanner(System.in);
System.out.println("Enter purchase amount under 1.00:");
purchase=keyboard.nextDouble();
change = 100 - purchase;
quarters = (change / 25);
dimes = (change / 10);
nickels = (change / 5);
pennies = (change / 1);
System.out.println("Enter purchase amount: " + purchase);
System.out.println("The change is: " + change);
System.out.println("The number of quarters is: " + quarters);
System.out.println("The number of dimes is: " + dimes);
System.out.println("The number of nickels is: " + nickels);
System.out.println("The number of pennies is: " + pennies);
}
}