### Arabic Numerals to Roman Numerals

Hey guys, this program is supposed to turn Arabic Numbers into Roman Numerals, but after making the program shown below I only am able to get some alt codes to show up (I got a green lantern symbol to show up) lol

How would I fix this program to show Roman numerals?

 ``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283`` ``````#include #include #include using namespace std; int main(void) //makes all values void until entered { system("color 0C"); while(true) { unsigned int Anum, divThousand, divHundred, divTen, divOne, //unsigned int keeps values unsigned until cin modThousand, modHundred, modTen, modOne; char RThousand; char RHundred; char RTen; char ROne; int I = 1; int IV = 4; int V = 5; int IX = 9; int X = 10; int L = 50; int C = 100; int D = 500; int M = 1000; RThousand = M; RHundred = C; RTen = X; ROne = I; //Arabic number, divide by 1000, divide by 100, divide by 10, //divide by 1, take remainder of 1000, " " 100, " " 10, " " 1, //Roman numeral thousands, " " hundreds, " " tens, " " ones cout <<"\t\tHello, today you can convert Arabic Numerals to Roman Numerals\n"; cout <<"\n\nPlease enter the number you would like to convert\n"; cin >> Anum; divThousand = Anum / 1000; //gets number to be reduced to just the first values of the digit place modThousand = Anum % 1000; divHundred = modThousand / 100; modHundred = modThousand % 100; divTen = modHundred / 10; modTen = modHundred % 10; divOne = modTen / 1; modOne = modTen % 1; RThousand = M * divThousand; //calculates the digits RHundred = C * divHundred; RTen = X * divTen; ROne = I * divOne; cout <<""<>YesNo; switch (YesNo) { case 'Y': case 'y': repeat = 1; system ("cls"); break; case 'N': case 'n': return 0; default: cout<< "Invalid answer." <
Try printing a number of M's equal to divThousand instead of whatever character happens to be at the ASCII value of 1000*divThousand. Same for the other numerals.
Topic archived. No new replies allowed.