Exercise : 2.45. Instructions: Inches to feet

  • Find and open the FeetInches Java program in the exercises2 package.
  • Prompt the user for some number of inches.
  • Produce output that corresponds the number of feet and any leftover inches when converted from the specified input.
  • Be sure your output:
    • Uses the word feet for plural and foot for singular number of feet.
    • Uses the word inches for plural and inch for singular number of feet.

For example:

  • 13 inches will produce: 1 foot and 1 inch
  • 17 inches will produce: 1 foot and 5 inches
  • 28 inches will produce: 2 feet and 4 inches