Java Program to Convert Rupees to Dollar


Aim :- Write a java program to convert rupees to dollar. (60 rupees = 1 dollar.)

Java Program :


import java.util.*; 
class dollar
{
     public static void main(String args[])
     {
          int dol;
          Scanner sc=new Scanner(System.in);
          System.out.print("\nEnter Rupees : ");
          int rupee=sc.nextInt(); 
          dol=rupee/60;
          System.out.println("\nDollar : "+dol);
     }
}

Output :




Post a Comment

0 Comments