Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

How i can write a c program that prompts the user to enter an integer number and then the program converts the number into its roman equivalent? anyone can help me,please? :)

OpenStudy (orclord):

hello sam99. I am not familliar with the c language. however i do know a little bit of python. its possible to have users input numbers, and have the program convert it. so i would recommend python for doing somthing like that. i could be wrong since i do not know and C language what so ever. hope this helped. :)

OpenStudy (rsmith6559):

Treat the prompt and enter code as it's own little program. The fun part is breaking down the number. You need to know whether you're dealing with thousands, hundreds, tens or ones. It's fairly simple to write a recursive function to find the exponent of your most significant digit, or you could do it with if/else if/else statements. Just output an M for each thousand. The digits always break down into X, IX, VIII, VII, VI, V, IV, III, II, I. The X and V can be C and L or M and D, depending on the magnitude of the digit. So you could make a table for each digit describing the 5's and 1's involved, and then depending on the magnitude, output the appropriate number of D's, L's, V's and C's, X's, I's.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!