CSS
using System;
namespace FinalExamBello
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Please type M for Mile-Kilometer conversion, P for Pound-Kilogram, I for Inch-Centimeter and G for Gallons-Liters.");
string ConType = Console.ReadLine();
Console.WriteLine("Please input value for conversion.");
int val = Convert.ToInt32(Console.ReadLine());
double M = val * 0.62137;
double P = val * 2.26796;
double I = val * 2.54;
double G = val * 3.78541;
switch (ConType)
{
case "M":
Console.WriteLine(M);
break;
case "P":
Console.WriteLine(P);
break;
case "I":
Console.WriteLine(I);
break;
case "G":
Console.WriteLine(G);
break;
default:
Console.WriteLine("No input detected. Please try again.");
break;
}
}
}
}