1)First use pass by value functions. The prototype of one of the two needed func
ID: 3761465 • Letter: 1
Question
1)First use pass by value functions. The prototype of one of the two needed functions looks like the following: double convertMilestoK(double miles);
2)In addition, please change the two functions to pass by reference functions in the second solution. These two functions do not return values. So one such function prototype looks like: void convertMilestoK(double& distance); The converted distance value is stored in the argument variable passed as a reference variable. You need to modify your program a lit bit in order to display the converted value.
Option 1: Write a program that will convert miles to kilometers and kilometers to miles. The user will indicate both a number (representing a distance) and a choice of whether that number is in miles to be converted to kilo - meters or kilometers to be converted to miles. Each conversion is done with value-returning functions. You can use the following conversions. 1 kilometer - .621 miles 1 mile = 1.61 kilometers Sample Run a * * Menu * * * * * * * * 1 convert miles to kilometers 2 convert kilometers to miles 3 Quit * * * * * * * * * * * * ********* Miles to be converted: 120 120 miles a 193.2 kilometers. Menu + + + tart in the like 1 Convert miles to kilometers 2 Convert kilometers to miles 3 Quit at * * * * * Klometers to be converted: 235 235 kilometers - 145.935 miles . Menu *t too hot to do it 1 Convert miles to kilometers Convert kilometers to miles 3 Quit a state as anExplanation / Answer
https://drive.google.com/file/d/0B3lVit8k3iPqUHNJQXZWT3kxdGs/view?usp=sharing
https://drive.google.com/file/d/0B3lVit8k3iPqUkZGdHkwWnRfVUk/view?usp=sharing
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.