Thursday, March 6, 2008

save this program as Centimeter.java

public class Centimeter{

public static void main (String[] args)

{
double Foot;
double inches;
double Centi;

Foot = 12;
inches = 2.54;
Centi = Foot * inches;

System.out.println("One foot = " + Centi + " centimeter");
}

}

No comments: