Hi below is my coding which converts euros to pounds.
import javax.swing.* ;
class tut3_3
{
public static void main ( String[] args)
{
final double PoundToEuro = 1.478 ;
String strEuros = JOptionPane.showInputDialog( "Enter amount in Euros:" ) ;
int Euros= Integer.parseInt( strEuros ) ;
double pounds = Euros / PoundToEuro;
System.out.println( Euros + " Euros = " + pounds + " pounds sterling" ) ;
}
}
I need to convert celcius to farenheit so was just wondering if the below code looks correct, please correct me if its not.
import javax.swing.* ;
class tut3_3
{
public static void main ( String[] args)
{
final double FarenheitToCelcius = 1.478 ;
String strEuros = JOptionPane.showInputDialog( "Enter Celcius:" ) ;
int Celcius= Integer.parseInt( strCelcius ) ;
double Farenheit = Celcius / FarenheitToCelcius;
System.out.println( Celcius + " Celcius = " + Farenheit + " Farenheit" ) ;
Does anybody know what number i should put where it asks for farenheitToCelcius because i dont know the conversion number.
Please reply.
Take care bye