You are on page 1of 3

[M12_CSQ3] Write a PAC Chart, algorithm, and flowchart for converting the given two-

digit number into its corresponding Roman numeral [CO1] [L1]

PAC
DATA PROCESSING OUTPUT
Input number • extract tenth place Print roman_number
digit from the
given number
• Calculate roman
equivalent for
tenth place digit
based on the
given condition
and store it in
roman_number
variable
• extract ones place
digit number from
the given number
• Calculate roman
equivalent for
ones place digit
based on
condition and
append it in
roman_number
variable

ALGORITHM

START
STEP 1: READ number
STEP 2: Extract tenth place digit
STEP 3: If tenth place digit is 1 then store X in roman_number
STEP 4: If tenth place digit is 2 then store XX in roman_number
STEP 5: If tenth place digit is 3 then store XXX in roman_number
STEP 6: If tenth place digit is 4 then store XL in roman_number
STEP 7: If tenth place digit is 5 then store L in roman_number
STEP 8: If tenth place digit is 6 then store LX in roman_number
STEP 9: If tenth place digit is 7 then store LXX in roman_number
STEP 10: If tenth place digit is 8 then store LXXX in roman_number
STEP 11: If tenth place digit is 9 then store XC in roman_number
STEP 12: Extract ones place digit
STEP 13: If ones place digit is 1 then store I in roman_number
STEP 14: If ones place digit is 2 then store II in roman_number
STEP 15: If ones place digit is 3 then store III in roman_number
STEP 16: If ones place digit is 4 then store IV in roman_number
STEP 17: If ones place digit is 5 then store V in roman_number
STEP 18: If ones place digit is 6 then store VI in roman_number
STEP 19: If ones place digit is 7 then store VII in roman_number
STEP 20: If ones place digit is 8 then store VIII in roman_number
STEP 21: If ones place digit is 9 then store IX in roman_number
STEP 22: DISPLAY roman_number
STOP

FLOWCHART

You might also like