Getting the remaining cents

Hi, I would like to know how to get the remaining cents from the program I've made..

Here's the program:

Code:

`import java.io.*;`

public class centsDollars {

public static void main (String[]args) {

BufferedReader input = new BufferedReader (new InputStreamReader(System.in));

String x="";

try {

System.out.println("Enter amount in nickel: ");

x = input.readLine();

int nickelin = Integer.parseInt(x);

System.out.println("Enter amount in penny: ");

x = input.readLine();

int penniesin = Integer.parseInt(x);

double pennies = (nickelin*5)+(penniesin);

double nickel = (pennies/5);

System.out.println("You entered " +nickelin+ " nickels and " +penniesin+ " pennies.\n");

System.out.println("The total amount in penny is "+pennies+".");

System.out.println("The total amount in nickel is "+nickel+".\n");

double dollar = (pennies/100);

System.out.println("The total amount is " +dollar+" Dollar." );

}

catch (IOException e) {

System.out.println("Error!");

}

}

}

Assuming I entered **3 nickels** and **122 pennies**.

This displays:

Quote:

You entered 3 nickels and 122 pennies.

The total amount in penny is 137.0.

The total amount in nickel is 27.4.

The total amount is 1.37 Dollar.

How can I output the amount in dollars the same as this?:

Quote:

The total amount is 1 Dollar and 37 Cents.