problem. They have very little depth perception and are constantly running into doors. They√ïve asked you to write a program to let them know when they should duck going through a doorway. Since Bumpkins love fun, some of their doorways have been made intentionally short of force other Bumpkins to either crawl or limbo through the door. Unfortunately, the Bumpkins don't all use the same set of measurements, so some heights are measured in inches, others in feet, others in yards, others in centimeters, and others in meters. To do the conversions, recall that: 1 inch = 2.52 cm 1 yard = 3 ft 1 foot = 12 inches 1 meter = 100 cm Input The input file will begin with a single line, telling you how many Bumpkins want help. Then, for each Bumpkin, there will be data about the Bumpkin and the doorways they reach. The first line of each dataset will give you the Bumpkin's name (all Bumpkins have names of exactly 6 characters), an integer n , the number of doors to process for this Bumpkin ( n > 0), and the Bumpkin's height, a floating point number followed by exactly one blank and then one of 'i', 'f', 'y', 'c', or 'm' (representing inches, feet, yards, centimeters, and meters). The next n lines will have the height of the doorways in the bumpkin's life, one per line. Each height will be a floating
You've reached the end of your free preview.
Want to read all 3 pages?
- Fall '09
- Imperial units, United States customary units, Inch, Bumpkins Assignment Information, Bumpkins