Search This Blog

Wednesday, 6 July 2016

Write a program to convert rupees to dollar. 60 rupees=1 dollar

Practical - 1


package pl;
import java.util.Scanner;

public class Pl {

    public static void main(String[] args) {
   
        double i;
        Scanner in =new Scanner(System.in);
       
        System.out.println("Enter Rs. to convert into $ :");
        i = in.nextInt();
        System.out.println("INR = "+i+"\nUSD = "+i/67.50);
   }
}

output:

Enter Rs. to convert into $ :
10000
INR = 10000.0
USD = 148.14814814814815

No comments:

Post a Comment