Objectives
- Use selection
- Get user input
- Perform calculations
- Demonstrate output formatting
Note: These example runs show several runs of the sample program.
Convert inches to: 1. feet 2. yards 3. centimeters 4. meters Enter choice: 6 Error: Invalid menu choice
Convert inches to: 1. feet 2. yards 3. centimeters 4. meters Enter choice: 1 Enter the number of inches: 27 That is 2 feet, 3 inches
Convert inches to: 1. feet 2. yards 3. centimeters 4. meters Enter choice: 2 Enter the number of inches: 99 That is 2 yards, 2 feet, 3 inches
Convert inches to: 1. feet 2. yards 3. centimeters 4. meters Enter choice: 3 Enter the number of inches: 27 That is 68.6 centimeters
Convert inches to: 1. feet 2. yards 3. centimeters 4. meters Enter choice: 4 Enter the number of inches: 27 That is 0.7 meters