← Back

Code Challenge 6 - Inches to Height Calculator


This calculator code challenge is deceivingly more challenging than the previous challenges. The formula for this calculator makes use of the modulus operator (%). Remember, the modulus operator, or mod for short, performs division and returns the remainder.

This calculator converts the user’s height in inches and converts it to feet and inches. For example, I’m 70 inches tall. That means I’m 5 foot 10 inches.

Skills to Practice

Challenge Tasks

  1. Create a console project named CodeChallenge6HeightToInches.
  2. Complete the folowing tasks:
    1. Prompt the user to enter their height in inches.
    2. Convert the height in inches to feet and inches.
    3. Output the result to the user.

Sample Output