关于单位转换的问题
初学者,这道题实在不知怎么做,还求各位大师指导!2. (45 pts) Adapted from Exercise 8.40 in Deitel & Deitel’s C How To 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, and so on for the metric system and inches, quarts, pounds, and so on 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 in 5 kilograms?
is not meaningful, because "feet" are units of length while "kilograms" are units of mass. Assume that you may only use the following prefixes for the metric conversions: milli-, centi-, deci-, deka-, hecto-, kilo-. Assume that the English system conversions do NOT have prefixes.
谢谢!!!