Due Date: Wednesday, September 14, or, correspondingly, Thursday, September 15, 2005, before the beginning of your lecture section.
Goal: the goal of this assignment is to learn how to deal with numbers in Java.
Write, on a sheet of paper with your name on it, a piece of code that asks the user for a height in inches and returns the corresponding height in centimeters. The corresponding formula is
Trace your code on an example of 100 inches, which should result in 254 cm.
What will happen if instead of 2.54 you write (254/100)? Will the result still be correct?
For extra credit: write a piece of code that transforms from centimeters to inches; hint: divide by 2.54.