C# program to convert inches to feet

Views: 1   

Following program shows you how to convert inches to feet.
In this program we get inches from user, once we get those we need to divide with 12 so that we get in feet

using System;

class MainClass {
    public static void Main (string[] args) {
    Console.WriteLine ("Please enter inches:");
    double inches = Convert.ToDouble(Console.ReadLine());
    double feet = inches / 12;
    Console.WriteLine(feet + " Feet");
  }
}

Output:

Please enter inches:
 36
3 Feet
On By