i have to write a simple java program
write an application that determines the value of coins in a jar and prints the total in dollars and cents. Read integer values that represent the number of quarters, dimes, nickels and pennies
so i did it i don't know where to go from here help would be appreciated
public class coins {
public static void main(String[] args) {
double quarters;
double dimes;
double nickels;
double pennies;
double money;
Scanner scan = new Scanner(System.in);
System.out.println("Enter the number of quarters in the jar.");
quarters = scan.nextInt();
System.out.println("Enter the number of dimes in the jar");
dimes= scan.nextInt();
System.out.println("Enter the number of nickels in the jar");
nickels = scan.nextInt();
System.out.println("Enter the number of pennies in the jar");
pennies = scan.nextInt();
money = quarters*25 + dimes*10 + nickels*5 + pennies*1;
System.out.println("Your total change in dollars and cents is "+money);
}
}
the last 2 have to be in dollar like 81 dollars and 27 cents but i get dollar is and cents is 81.00 i dont no the code to split it,i dont understand floating what where do i put it ??? any one help me out