Assignment 1 Java
Assignment 1 Java
package javaapplication1;
/**
* @author Rira
*/
public class Convertor {
public static void main( String [] args )
{
//***** 1. declare any constants here
//double x = 0.555;
//int temperature;
double celsius;
int fahrenheit=212;
double fahrenheit1;
celsius= 5.0/9.0*(fahrenheit-32);
// x *(fahrenheit-32);
// ((fahrenheit - 32)*5)/9;
}
}
METRIC LENGHT:
package javaapplication1;
/**
* @author Rira
*/
public class MetricLenght {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
double CPI=2.54;
double INCHES=2;
double Centimeters;
Centimeters=INCHES*CPI;
System.out.println("The inche number is:"+INCHES);
System.out.println("Equivalent Centimeters is:"+Centimeters);
}