Question: C program to read a text file and check if the input file contains valid ROMAN numeral and print equivalent ASCII value if in ASCII

C program to read a text file and check if the input file contains valid ROMAN numeral and print equivalent ASCII value if in ASCII range(32-125).

For example: If the input is 'C' or 'c', this is decimal 100 so the code should print 'd' as it is an equivalent ASCII character for 100

If the input is 'XIXX' or 'xxix', it should print an error message as it is not a valid roman numeral

If the input is 'CL' or 'cl', it should print an error message as it is out of the ASCII range

If the input is 'ACX' or 'acx', it should print an error message because 'A' is not a valid roman numeral

You can create a text file and fill it with the given roman numerals and check your result.

LXXII CI CVIII CVIII CXI XXXII LXVII LXXXIII XXXII L LII XLIX XXXII CXV CXVI CXVII C CI CX CXVI CXV XLIV CXVI CIV CV CXV XXXII CV CXV XXXII XCVII XXXII CXVI CI CXV CXVI XLVI LXXXIX CXI CXVII CXIV XXXII CXII CXIV CXI CIII CXIV XCVII CIX XXXII CIX CXVII CXV CXVI XXXII CXII XCVII CXV CXV CXVI CIV CV CXV XXXII CXVI CI CXV CXVI XLVI 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!