logo image

C# program to convert millimeters into centimeters

110


Following program shows you how to convert millimeters into centimeters. In this program we get millimeters from user, once we get those we need to divide with 10 so that we get in centimeters

using System;

class MainClass {
    public static void Main (string[] args) {
    Console.WriteLine ("Please enter millimeters:");
    double millimeters = Convert.ToDouble(Console.ReadLine());
    double centimeters = millimeters / 10;
    Console.WriteLine(centimeters + " Centimeters");
  }
}

Output:

Please enter millimeters:
 350
35 Centimeters