Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

WhatsApp X FOL INFO-1156 Project 1.2022.01 (v1.( x Zy Section 3.1 - INFO 3134: Object ( x () Homepage - INFO-3104 - RelationX + V

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
WhatsApp X FOL INFO-1156 Project 1.2022.01 (v1.( x Zy Section 3.1 - INFO 3134: Object ( x () Homepage - INFO-3104 - RelationX + V X C A fanshaweonline.ca/d21/le/content/1326718/viewContent/11455433/View Q E X Update Project Description Write a C (not C++) console application (in Visual Studio) that converts Roman numbers (e.g. XIV) to Arabic numbers (e.g. 24) or Arabic numbers to Roman numbers. Concepts Roman numerals use a plus/minus system based on whether the smaller numeral precedes or follows the larger numeral. Base Values Numeral Value Numeral Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 Combining rule Numeral values are added together, unless the numeral is followed by a greater numeral. In this case, the smaller numeral value is subtracted from the following value. Examples Roman Arabic Roman Arabic III 3 VI 6 IV 4 XCII 92 Type here to search O Fi O X EM 20 C A DID ()) ENG 16:18 03-06-2022WhatsApp X FOL) INFO-1156 Project 1.2022.01 (v1. x Zy Section 3.1 - INFO 3134: Object ( x O)) Homepage - INFO-3104 - Relation X + V X C A fanshaweonline.ca/d21/le/content/1326718/viewContent/11455433/View Q E X Update Fractions The romans represented fractions using two symbols, 'S' for semis - a half, and '' for an uncia - a twelfth. Examples Roman Arabic Roman Arabic IIIS 3-=3.5 VI- 6-2: 12- IVS... 9 - =4.75 XXXCIIS.... 92 10 12 12 We'll have to use periods for the dots, since a dot is not easily typed on a standard keyboard. Type here to search O Ei 3 9 X 20 C ~ 9 D () ENG 16:18 03-06-2022WhatsApp X FOL INFO-1156 Project 1.2022.01 (v1.( x Zy Section 3.1 - INFO 3134: Object ( x (o)) Homepage - INFO-3104 - RelationX + V X C A fanshaweonline.ca/d21/le/content/1326718/viewContent/11455433/View Q E X Update Apostrophes (Balanced) The earlier method for representing large numbers is the apostrophes. In this system, the number five hundred 'D' is represented by an 'I' and a backward c - '' (D = IO). One thousand (1000) was written as CIO. Adding C's to either side multiplies the number by 10. Examples Roman Arabic Roman Arabic CIO 1,000 CCCIODO 100,000 CCIOO 10,000 CCCCIODOO 1,000,000 IIICCIOO 10,052 ICCCCIOOOD 1,000.001 If there are additional backwards c's, we add a multi of five. Examples (Unbalanced) Roman Arabic Roman Arabic CI 500 CCCI 50.000 CCI 5.000 CCCCI 500,000 ATCICCI 5.555 ACCCCI 500,005 These can be combined... Fromnlac (Inhalonead) Type here to search O 9 X EM 16:19 20 C ~ 9 D () ENG 03-06-2022WhatsApp X FOL INFO-1156 Project 1.2022.01 (v1. x zy Section 3.1 - INFO 3134: Object ( x ()) Homepage - INFO-3104 - Relation X + V X C A fanshaweonline.ca/d21/le/content/1326718/viewContent/11455433/View Q E X Update Examples (Unbalanced) Roman Arabic Roman Arabic CCIO 1,500 CCCCIOO 15,000 CCCIOO 10,500 CCCCCCIODO 150,000 IXXCCCIOS 10,521 AICCCCCCIODO 150,004 Vinculum The apostrophes system is very limited in the possible number that can represented. The vinculum system writes a bar above the numerals indicate that the numerals beneath should be multiplied by 1,000. Thus, IV is 4,000. Examples Roman Arabic Roman Arabic IV 4,000 IV XX 4,020 Requirements Write a C program (no C++, Visual Studio 2019 solution) that reads either a Roman number or an Arabic number and then converts the number to the other representation (automatically detects the direction of the conversion). The fraction notation will use periods instead of dots. The apostrophes notation will use a right parenthesis ')' for the backward c '' as the backward c is not nart of the ASCII character cat Type here to search O 9 X EM 16:19 20 C ~ DO () ENG 03-06-2022WhatsApp X FOL INFO-1156 Project 1.2022.01 (v1.( x zy Section 3.1 - INFO 3134: Object ( x ()) Homepage - INFO-3104 - RelationX + V X C A fanshaweonline.ca/d21/le/content/1326718/viewContent/11455433/View Q E X Update Requirements Write a C program (no C++, Visual Studio 2019 solution) that reads either a Roman number or an Arabic number and then converts the number to the other representation (automatically detects the direction of the conversion). The fraction notation will use periods instead of dots. The apostrophes notation will use a right parenthesis ')' for the backward c '' as the backward c is not part of the ASCII character set. The vinculum notation will use a dash or underscore following the numerals that it modifies. (e.g. XX- and XX are 20.000. XX-XX is 20.020. and IV XX is 4.020). Type here to search O 9 x 16:19 20 C ~ DO () ENG 03-06-2022WhatsApp X FOL INFO-1156 Project 1.2022.01 (v1. x Zy Section 3.1 - INFO 3134: Object ( x O)) Homepage - INFO-3104 - RelationX + V X C A fanshaweonline.ca/d21/le/content/1326718/viewContent/11455433/View Q E X Update The vinculum notation will use a dash or underscore following the numerals that it modifies. (e.g. XX- and XX_are 20,000, XX-XX is 20,020, and IV_XX is 4,020). The program should repeat the conversions until the user types 'quit' (less marks for a non- repeating program) The output should print only as many decimals places as necessary. The program input should be case insensitive. References https://en.wikipedia.org/wiki/Roman numerals Type here to search OX w 16:19 O 20 C ~ 9 D () ENG 03-06-2022

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions