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));
}
}
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
Post a Comment