So I'm producing this program that can only accept a numerical value from 1 to 5, and by only using switch statements, I have to turn that numerical value into the respective roman numeral. I'm having trouble with the int case, as I already tried it with double quotes around the numbers, as I'm sure single quotes are for characters. I made sure to include iostream and have int = num;
#include <iostream> //preprocessor directives are included
using namespace std;
int main() {
int num = 0;
cout << "Enter a number from 1 to 5: " << endl;
cin >> num;
switch (num) {
case "1" :
cout << "I" << endl;
break;
case "2" :
cout << "II" << endl;
break;
case "3" :
cout << "III" << endl;
break;
case "4" :
cout << "IV" << endl;
break;
case "5" :
cout << "V" << endl;
break;
}
}