/*
 * Clement Aubert
 * 08/30/2019
 * CSCI 1301 -- Project 1
 */

using System;

    class Program
    {
        static void Main(string[] args)
        {
        /* Display the information about us: */

        string uName = "caubert";
        Console.WriteLine(uName + " would like to know your height in centimeters. Please enter it: ");

        /* Gather the information about the user :*/

        double heightIncm; // We use a double to store the height in centimeters given by the user.
        heightIncm = double.Parse(Console.ReadLine()); // We read as a string the value entered, and then convert it to a double

        /* Conversion */

        double heightInin; // Vaariable to hold the height in inches

        /* 
         * Conversion factor from cm to ft change with where you are!
         * https://en.wikipedia.org/wiki/Foot_(unit)#US_survey_foot
         * 
         * In Georgia, we use the U.S. Survey feet
         * https://www.ngs.noaa.gov/SPCS/images/spcs83_legislation_feet.png
         * 
         * So, 
         * 1 ft = 0.304800609601 m
         * 1 ft = 30.4800609601 cm
         * 
         * But we will use anther way of computing the height.
         * We will convert it to inches, using
         * 1 in = 2.54 cm
         * and then obtain the feet using
         * 1 ft = 12 in
         */

        heightInin = heightIncm / 2.54; // Store the height in inches of the user.
        // The rest of the computation, and the truncation, will take place at the next step.

        /* Displaying the result */
        Console.WriteLine(
            uName +  " computed that your height is " 
            + (int)(heightInin / 12) // Compute the number of feet, and truncate it.
            + " ft and "
            + (int)(heightInin % 12) // Compute the remainder of the previous operation, and truncate it.
            + " inches."
            );
    }
}

