In this tutorial, I have decided to create a simple Feet to Inches calculator program in C# Console.
First one we have to know how to convert Feet to Inches .
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.
feet = inch/12 -> inch = feet*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 inch; Console.Write("Input Value (Feet) : "); double feet = Convert.ToDouble(Console.ReadLine()); inch = feet*12; Console.WriteLine("{0} Feet : {1} Inches", feet, inch); Console.ReadKey(); } |
Output: