Problem 45
(Writing the Word Equivalent of a Check Amount) Continuing the discussion of the previous example, we reiterate the importance of designing checkwriting systems to prevent alteration of check amounts. One common security method requires that the check amount be both written in numbers and "spelled out" in words. Even if someone is able to alter the numerical amount of the check, it is extremely difficult to change the amount in words. Write a program that inputs a numeric check amount and writes the word equivalent of the amount. Your program should be able to handle check amounts as large as $99.99. For example, the amount 112.43 should be written as ONE HUNDRED TWELVE and 43/100
Problem 47
(A Metric Conversion Program) Write a program that will assist the user with metric conversions. Your program should allow the user to specify the names of the units as strings (i.e., centimeters, liters, grams, etc., for the metric system and inches, quarts, pounds, etc., for the English system) and should respond to simple questions such as "How many inches are in 2 meters?" "How many liters are in 10 quarts?" Your program should recognize invalid conversions. For example, the question "How many feet are in 5 kilograms?" is not meaningful, because "feet" are units of length, while "kilograms" are units of weight