convert Miles To meter - CSharp System

CSharp examples for System:Math Convert

Description

convert Miles To meter

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;/*from ww w  . j a va  2  s. c om*/

public class Main{
         private const float MILES_TO_CNTMTR = 160934.4f;
        //convert miles to centimeters
        public static void convertMilesToCntmtr(float mile)
        {

            double result = MILES_TO_CNTMTR * mile;
            Console.WriteLine("There are {1} centimeters in {0} miles", mile, result);


        }
}

Related Tutorials