// Directions: Practice #8-1
// 1) Create a string variable for a numeric input.
// 2) Add a Switch statement to convert the variable to a Roman Numeral.
// 3) The switch statement should only convert input for 1, 2, 3, 4, 5, 6, 7, 8, 9, or 10.
// 4) If the output is outside the range, and appropriate error message should show.
// 5) Submit your dotnetfiddle link in Blackboard.
using System;
public class Program
{
public static void Main()
try
double dblRomanNumeral = 1;
switch (dblRomanNumeral)
case 1:
Console.WriteLine("I");
break;
case 2:
Console.WriteLine("II");
case 3:
Console.WriteLine("III");
case 4:
Console.WriteLine("IV");
case 5:
Console.WriteLine("V");
case 6:
Console.WriteLine("VI");
case 7:
Console.WriteLine("VII");
case 8:
Console.WriteLine("VIII");
case 9:
Console.WriteLine("IX");
case 10:
Console.WriteLine("X");
default:
throw new Exception("Unknown value");
}
catch (Exception ex)
Console.WriteLine(ex + ("Unknown Number was Imputed"));