Tuesday, 29 August 2017

Core Java Program To Convert Rupees Into Dollar. 60 Rupees = 1 Dollar

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



Program

public class Convert {
public static void main(String args[])
{
if(args != null && args.length == 2)
{
int x = Integer.parseInt(args[0]);
int y = Integer.parseInt(args[1]);
System.out.println("Doller=" + y*x);
 }
else
System.out.println("Wrong number of command line arguments. This program require 2 arguments");
}

}

Output

convert rupees to dollar


0 comments:

Post a Comment