- 2 Write A C Program That Allows The User To Convert Between Meters And Feet The Program Prompts The User To Enter A 1 (58.99 KiB) Viewed 29 times
2- Write a C++ program that allows the user to convert between meters and feet, the program prompts the user to enter a
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
2- Write a C++ program that allows the user to convert between meters and feet, the program prompts the user to enter a
2- Write a C++ program that allows the user to convert between meters and feet, the program prompts the user to enter a value, and then to enter the conversion choice: Choice A: to convert from meters to feet. Choice B: to convert from feet to meters. Use the following functions in your program: 1. menu This function only prints the menu to the user. 2. metersToFeet Receives the distance from main and convert it from meters to feet using the formula: feet = m * 3.2808 Then returns the result to the main function. 3. feetToMeters Receives the distance from main and convert it from feet to meters using the formula: m = feet / 3.2808 Then, return the result to the main function Please enter the distance value 15 Please choose from the menu: A: Convert from meters to feet B: Convert from feet to meters A Distance after conversion = 49.212 feet. #include<iostream> Please enter the distance value 20 Please choose from the menu: A: Convert from meters to feet B: Convert from feet to meters B Distance after conversion = 6.09607 m.