Write a java program to convert the money. From rupee to paisa.

Q.1 Write a java program to convert the money. From rupee to paisa. 

Solution :- 

import java.util.Scanner;

public class RupeeToPaisaConverter {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print(“Enter the amount in rupees: “);
double rupees = scanner.nextDouble();
int paisa = (int) (rupees * 100);
System.out.println(rupees + ” rupees is equal to ” + paisa + ” paisa.”);

}
}

Output :- 

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.