How to convert inches to centimeters in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        double inch = 5;
        
        double centimeter = inch * 2.54;

        Console.WriteLine("Inches = " + centimeter);
    }
}



    
/*
run:
    
Inches = 12.7
    
*/

 



answered Sep 11, 2021 by avibootz

Related questions

1 answer 110 views
1 answer 116 views
1 answer 255 views
1 answer 142 views
142 views asked Sep 11, 2021 by avibootz
1 answer 139 views
1 answer 191 views
1 answer 193 views
...