5th sem OOPJ Write a program to convert rupees to dollar. 60 rupees=1 dollar.

import java.text.*;
import java.util.*;

/**
 *
 * @author Yash
 */

class pra1{
    public static void main(String a[]){
        Scanner sc = new Scanner(System.in);
        DecimalFormat numfor = new DecimalFormat("#.000");//This is to fix after the decimal size.
        System.out.println("Enter the rupees :");
        double rup = sc.nextInt();
        double dol = rup/60;
        System.out.println("Your Current doller is : " + numfor.format(dol));
    }  
}

Comments

Popular posts from this blog

5th sem OOPJ Write an interactive program to print a diamond shape. For example, if user enters the number 3, the diamond will be as follows:

SQL Lab1: Create a Database Table for DayCare

SQL Lab 11