C# program to convert centimeters into millimeters

Views: 21   

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

using System;

class MainClass {
    public static void Main (string[] args) {
    Console.WriteLine ("Please enter centimeters:");
    int centimeters = Convert.ToInt32(Console.ReadLine());
    int millimeters = centimeters * 10;
    Console.WriteLine(millimeters + " Millimeters");


Please enter centimeters:
250 Millimeters
On By