In this tutorial, I have decided to create a simple Inches to Feet calculator program in C# Console.
First one we have to know how to convert Inches to Feet .
In 1959, the international yard and pound agreement (between the states of the United States and the British Millennium Community) defined a feet exactly 12 inches.
1 feet = inch/12
here are the Inches to Feet program codes;
1 2 3 4 5 6 7 8 9 10 11 12 |
static void Main(string[] args) { double feet; Console.Write("Input Value (Inches) : "); double inc = Convert.ToDouble(Console.ReadLine()); feet = inc/12; Console.WriteLine("{0} Inches : {1} Feet", inc, feet); Console.ReadKey(); } |
Output: