i am very very very new to computer sicence thing...
converting number to roman numeral is kinda hard for me
i learned looping,branching,and strings
can u guys help me?
Code:#include<iostream>
using namespace std;
int main()
{
short x;
cout << "Enter your number:"
<<endl;
cin >> x;
if(x == 1)
{
cout << "I";
}
else if(x == 5)
{
cout << "V";
}
else if(x == 10)
{
cout << "X";
}
else if(x == 50)
{
cout << "L";
}
else if(x == 100)
{
cout << "C";
}
else if(x ==500)
{
cout << "D";
}
else if(x == 1000)
{
cout << "M";
}
else
{
cout << "error\n"
<<endl;
}
return 0;
}