Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EXERCISE ONE: SINGLE UNIT CONVERTER The program should ask the user to enter a distance in Inches. The program will clear the screen after reading

EXERCISE ONE: SINGLE UNIT CONVERTER
The program should ask the user to enter a distance in Inches.
The program will clear the screen after reading the data from the user.
Then, the Program displays a menu Example:
a. TO CONVERT FROM INCHES TO CENTIMETERS ENTER OR A)
b. TO CONVERT FROM INCHES TO METERS ENTER (B OR B)
c. TO CONVERT FROM INCHES TO FEET ENTER (C OR C)
d. TO CONVERT FROM INCHES TO YARD ENTER (D OR D)
e. TO CONVERT FROM INCHES TO KILOMETERS ENTER (E OR E)
f. TO CONVERT FROM INCHES TO MILES ENTER (F OR F)
No conversion if any other character besides the listed above
Enter the Choice?
The program based on the character entered by the user will convert the number entered in step one to that specific unit.
The program will clear the screen after reading the data from the user.
The program will display the converted number.
EXAMPLE OUTPUTS
PLEASE ENTER A DISTANCE IN INCHES: 50
a. TO CONVERT FROM INCHES TO CENTIMETER
b. TO CONVERT FROM INCHES TO METERS
c. TO CONVERT FROM INCHES TO FEET d. TO CONVERT FROM INCHES TO YARD
e. TO CONVERT FROM INCHES TO KILOMETERS
TO CONVERT FROM INCHES TO MILES
ENTER YOUR CONVERSION CHOICE: D
(50) INCHES IS EQUIVALENT TO (1.38889) YARDS
PLEASE ENTER A DISTANCE IN INCHES: 1
a. TO CONVERT FROM INCHES TO CENTIMETER
b. TO CONVERT FROM INCHES TO METERS
c. TO CONVERT FROM INCHES TO FEET d. TO CONVERT FROM INCHES TO YARD
e. TO CONVERT FROM INCHES TO KILOMETERS
f. TO CONVERT FROM INCHES TO MILES
ENTER YOUR CONVERSION CHOICE: b
(1) INCHES IS EQUIVALENT TO (0.0254) METERS
PLEASE ENTER A DISTANCE IN INCHES: 200
a. TO CONVERT FROM INCHES TO CENTIMETERS
b. TO CONVERT FROM INCHES TO METERS
c. TO CONVERT FROM INCHES TO FEET d. TO CONVERT FROM INCHES TO YARD
e. TO CONVERT FROM INCHES TO KILOMETERS
f. TO CONVERT FROM INCHES TO MILES
ENTER YOUR CONVERSION CHOICE: x
INVALID CHOICE AND THE CONVERSION RESULT IS N/A
Page 1 of 3
EXERCISE TWO: MULTIPLE UNIT CONVERTER
EXAMPLE OUTPUTS
PLEASE ENTER A DISTANCE IN INCHES TO CONVERT TO OTHER UNITS: 50
\table[[(50) INCHES IS EQUIVALENT TO:,],[CENTIMETERS,127.00000],[METERS,1.2700000],[FEET,4.16667],[YARDS,1.38889],[KILOMETERS,0.00127],[MILES,0.00078]]
PLEASE ENTER A DISTANCE IN INCHES TO CONVERT TO OTHER UNITS: 1
(1) INCHES IS EQUIVALENT TO:
CENTIMETERS 2.54
METERS
FEET YARDS
MILES ,0.0277778
0.0000157
CONVERSION FORMULAS
\table[[Inches =(100254)** centimeter],[Inches =(1003937)** meter],[Inches =(112)** foot],[Inches =(136)** yard],[Inches =(139370)** kilometer],[Inches )(Need Exercise 2 but both would be apriciated, thank you)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Time Database Systems Architecture And Techniques

Authors: Kam-Yiu Lam ,Tei-Wei Kuo

1st Edition

1475784023, 978-1475784022

More Books

Students also viewed these Databases questions