// 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()
string strInput = "23";
string strOutput = string.Empty;
switch(strInput)
case "1":
strOutput = "I";
break;
case "2":
strOutput = "II";
case "3":
strOutput = "III";
case "4":
strOutput = "IV";
case "5":
strOutput = "V";
case "6":
strOutput = "VI";
case "7":
strOutput = "VII";
case "8":
strOutput = "VIII";
case "9":
strOutput = "IX";
case "10":
strOutput = "X";
default:
Console.WriteLine(strInput + " is not between 1 and 10");
}
Console.WriteLine(strInput + " converts to " + strOutput);