Add to Favorites    Make Home Page 135116 Online
 Language Categories
 Source Codes Home Project Ideas New! Interview Questions FAQs Home ASP Home ASP Source Codes ASP Script Directory New! ASP .Net Script Directory New! ASP Interview Questions ASP FAQs ASP How Tos C Home C Source Codes C Script Directory New! C Interview Questions C FAQs C How Tos C++ Home C++ Source Codes C++ Script Directory New! C++ Interview Questions C++ FAQs C++ How Tos Java Home Java Source Codes Java Directory New! Java Interview Questions Java FAQs Java How Tos JavaScript Home JavaScript Directory New! JavaScript Source Codes JavaScript FAQs JavaScript How Tos COBOL Home COBOL Source Codes COBOL FAQs COBOL How Tos Pascal Home Pascal Source Codes Pascal FAQs Pascal How Tos PHP Script Directory New! Python Script Directory New! Perl & CGI Script Directory New! Flash Script Directory New! CFML Script Directory New! Remotely Hosted Scripts New! Tools & Utilities Directory New! XML Script Directory New! Best Programmers Amit Mathur Vishal Bhardwaj Deepesh Jain Vyom NetWork
 Our Services

Home » C Home » Mathematics Home » Program for Decimal to Roman Number conversion.

A D V E R T I S E M E N T

Search Projects & Source Codes:

 Title Program for Decimal to Roman Number conversion. Author Orville Zaragoza Author Email rhounyboy [at] yahoo.com Description This program converts decimanl numbers entered into roman numerals. Category C » Mathematics Hits 370158 Code Select and Copy the Code #include main() { int a,b,c,d,e; clrscr(); printf("Input a number (between 1-3000):"); scanf("%d",&e); while (e==0||e>3000) { printf ("ERROR: Invalid Input! "); printf ("Enter the number again:"); scanf ("%d",&e); } if (e>3000) printf("Invalid"); a = (e/1000)*1000; b = ((e/100)%10)*100; c = ((e/10)%10)*10; d = ((e/1)%10)*1; if (a ==1000) printf("M"); else if (a ==2000) printf("MM"); else if (a ==3000) printf("MMM"); if (b == 100) printf("C"); else if (b == 200) printf("CC"); else if (b == 300) printf("CCC"); else if (b == 400) printf("CD"); else if (b ==500) printf("D"); else if (b == 600) printf("DC"); else if (b == 700) printf("DCC"); else if (b ==800) printf("DCCC"); else if (b == 900) printf("CM"); if (c == 10) printf("X"); else if (c == 20) printf("XX"); else if (c == 30) printf("XXX"); else if (c == 40) printf("XL"); else if (c ==50) printf("L"); else if (c == 60) printf("LX"); else if (c == 70) printf("LXX"); else if (c ==80) printf("LXXX"); else if (c == 90) printf("XC"); if (d == 1) printf("I"); else if (d == 2) printf("II"); else if (d == 3) printf("III"); else if (d == 4) printf("IV"); else if (d ==5) printf("V"); else if (d == 6) printf("VI"); else if (d == 7) printf("VII"); else if (d ==8) printf("VIII"); else if (d == 9) printf("IX"); getch(); }

Related Source Codes

 Script Name Author The Game Opposite as seen on Nokia 2300 Mobile Manikanta RECURSIVE BALANCED QUICK SORT ashish Radix Sort ashish Change your mouse pointer Ashim The blinking star Shashank Data Validation Crylittlebaby To search a file by giving file type like mp3 or mpeg or doc Prashanth SR Menus Demonstration B.Chidhambaram Employee Database Project Using C. Reenku Raman Nayak Creating a Lexical Analyzer in c fahad bader al-buhairi ¦Õ¤ ?¤Ð Ãß??ÝÐÝ Calendar Program Omkar & Devendra Stop double Process for start in C Cedrik Jurak Stop double Process for start in C Cedrik Jurak Time Scheduler Atiq Anwar A timepass game between atmost two players Rahul Roy

A D V E R T I S E M E N T

Subscribe to SourceCodesWorld - Techies Talk
Email:

 Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home