Question: Write a program that does the following: 1 . Ask the user to enter a distance in meters. 2 . Store the value entered in
Write a program that does the following:
Ask the user to enter a distance in meters.
Store the value entered in a variable. make sure you choose the right name and
data type
Compute the distance in feet and inches. Make sure you use named constants
for and literals.
Store both feet and inches in two separate variables. make sure you choose
the right names and data types
Display the number entered and its conversion in feet and inches.
Good to know:
meter feet and inches. Let us use this approximation.
inches feet.
Note: Often when you work on a project, a domain expert joins the team. The person is
not necessarily a technical person. In our case, someone who knows the conversion
formula told us
Output examples:
Run:
Please enter a number of meters to be converted:
meters is equal to feet and inches.
Run:
Please enter a number of meters to be converted:
meters is equal to feet and inches
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
