Q:

Calculate Dollar Amount Conversion Program Using Java

0

This Program is used to calculate Dollar Amount Conversion using Java

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

// dollar conversion 

import java.io.*; 

class ssva28 
{ 
public static void main(String arg[]) throws IOException 
{ 
double n,i; 
BufferedReader inp = new BufferedReader(new InputStreamReader(System.in)); 
System.out.print("\n\nEnter the Dollar value($): "); 
n=Double.parseDouble(inp.readLine()); 
System.out.print("\n\nEnter the Current Equivalent Rupee value(Rs.): "); 
i=Double.parseDouble(inp.readLine()); 
System.out.println("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); 
System.out.println("\n\tDollar($)\t\tEquivalent Rs. value\t\tRupee(Rs.)"); 
System.out.println("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); 
System.out.println("\n\t "+n+"\t\t\t "+i+"\t\t "+(n*i)); 
} 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now