Question: C++ lamguage 5. (15 points) Reference Parameters (returning multiple values): Write a C++ function that converts standard time to military time. Inputs include hours and

5. (15 points) Reference Parameters (returning multiple values): Write a C++ function that converts standard time to military time. Inputs include hours and minutes in standard time and a character equal to ' a ' for am or ' p ' for pm. The function call might look like: Military Time(SHour, SMin, AorP, MHour, MMin); Also write a main program to prompt the user for the inputs (such as 1:30 am), call the function, and display the input and the output in the following form: - 12:30am=0030 - 2:30am=0230 - 3:30pm=1530 - 12:00 am =0000 Run the program for the four cases above plus at least three other cases. Hint: Using fill(' 0 ) is an easy way to show leading zeros. 6. (15 pts) Default arguments: Write a C++ function ExpoArea that will return the area under an exponential function of the form AeBt by integrating the function from limits L1 to L2. Recall that: Hint: You don't need to integrate. Just use this result: Area =BA[eBL2eBL1] The function should have inputs for A, B, L1, and L2. NOTE: L1 and L2 should have default arguments of 0 and 1E100 (approximately ). Since L1 and L2 are default arguments, they can be omitted if Ll=0 and L2=. (If you don't recall what default arguments are, find an example in the class notes before proceeding.) Examples: Result = ExpoArea (10,0.5,2,3) should return a value of 2.895 Result = ExpoArea (10,2.5) should return a value of 4 A) Write function ExpoArea as described above. B) Write a main function that calls the function 5 times (once for each of the 5 test cases below) and displays the area. Use the minimum number of inputs required with the function in each case. No user inputs are required
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
