FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 761   



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

import java.util.Scanner;

public class MathUnitConversions16 {

    public static void main(String[] args) {

        float dollars;

        Scanner in = new Scanner(System.in);

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

        dollars = in.nextLong();

        float rupees = dollars * 64;

        System.out.println(rupees + " Rupees");

    }
}

Output:

Please enter dollars:
25
1600.0 Rupees



On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News