You are on page 1of 2

/*

Name: Le Cong Thanh Khoa


Class: 21 ECE
*/

#include <iostream>
using namespace std;

int main()
{
int n;
cout << "Roman Numeral Converter\n";
cout << "Enter a number between 1 and 10: ";
cin >> n;
switch (n)
{
case 1:
cout << "The Roman numeral for ";
cout << n << " is I\n";
break;
case 2:
cout << "The Roman numeral for ";
cout << n << " is II\n";
break;
case 3:
cout << "The Roman numeral for ";
cout << n << " is III\n";
break;
case 4:
cout << "The Roman numeral for ";
cout << n << " is IV\n";
break;
case 5:
cout << "The Roman numeral for ";
cout << n << " is V\n";
break;
case 6:
cout << "The Roman numeral for ";
cout << n << " is VI\n";
break;
case 7:
cout << "The Roman numeral for ";
cout << n << " is VII\n";
break;
case 8:
cout << "The Roman numeral for ";
cout << n << " is VIII\n";
break;
case 9:
cout << "The Roman numeral for ";
cout << n << " is XI\n";
break;
case 10:
cout << "The Roman numeral for ";
cout << n << " is X\n";
break;
default:
cout << "You must enter a number between 1 and 10\n";
cout << "Run the program over and try again.\n";
break;
}
return 0;
}

You might also like