C Language | Decimal-to-Roman Conversion

Friday 14 December 2012

Centuries ago, people were using the Roman Numerals as their numbers. Today, we are using the Decimal numbers. Before, roman numerals is a specific letter that has an equivalent value. For example, capital letter I indicates that its value is one (1). Though we are not really using roman numerals today, we are still studying about this because this is one of the important history and foundations in mathematics.

Today's generation, there a a lot of kids that have difficulties in studying the roman numerals especially that it is composed of letters. So, there are a lot of confusions going on in the process of learning. Because of this, I made a program that can convert decimal numbers to roman numerals to make it more easy for the kids to learn. This program will also expand the knowledge of the future programmers about decision making statements and repetitive statements. Decision making statement is what we call Switch case statements. While, repetitive statements are the Do-While and For Loop statements. For this program we will be using for loop statement.  To start, check out the codes below.


   9:  #include <stdio.h>
  10:   
  11:  #include <conio.h>
  12:   
  13:   
  14:   
  15:  main()
  16:   
  17:  {
  18:   
  19:   
  20:   
  21:  int count;
  22:   
  23:  int b;
  24:   
  25:   
  26:   
  27:  int num=1;
  28:   
  29:  int num1,num2,num3,num4;
  30:   
  31:        
  32:   
  33:        printf("Enter how many counts: ");
  34:   
  35:        scanf("%d",&count);
Related Posts Plugin for WordPress, Blogger...