Java program to convert rupees to dollars

Views: 2764   

Following program shows you how to convert rupees to dollars
In this program we get rupees from user, once we get those we need to divide with 64 so that we get in dollars

import java.util.Scanner;

public class MathUnitConversions17 {

    public static void main(String[] args) {

        float rupees;

        Scanner in = new Scanner(;

        System.out.println("Please enter rupees:");

        rupees = in.nextLong();

        float dollars = rupees / 64;

        System.out.println(dollars + " Dollars");


Please enter rupees:
4.6875 Dollars
On By