#include
#include
#include
#include
//For Any Queries,MailMe themask99@yahoo
// .com
void main()
{
char a[15];
cout<<"Enter The Roman Number :";
cin>>a;
for(int x=0,p=0,flag=0,rom=0,int i=strlen(a)-1;i>=0;i--)
{
if (a[i]=='i' || a[i]=='I') x=1;
if (a[i]=='v' || a[i]=='V') x=5;
if (a[i]=='x' || a[i]=='X') x=10;
if (a[i]=='l' || a[i]=='L') x=50;
if (a[i]=='c' || a[i]=='C') x=100;
if (a[i]=='d' || a[i]=='D') x=500;
if (a[i]=='m' || a[i]=='M') x=1000;
if (x
else flag = 1;
rom= rom + (x*flag);
p=x; //storing the previous value in x
}
cout<<"Numerical value is : "< getch(); }