subject
Engineering, 24.03.2020 00:30 jaz5380

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:

MilitaryTime(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:30 am= 0030
2:30 am = 0230
3:30 pm = 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.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Acompressor receives the shaft work to decrease the pressure of the fluid. a)- true b)- false
Answers: 3
question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
What are the two (02) benefits, which may result from a successful implementation of preventive maintenance (pm) program in an organization? (clo3)a)- lean manufacturing b)-overlapping responsibilities c)-the planner is not qualified d)-accurate contractor information e)-reduction in equipment redundancies f)-accurate stores information
Answers: 3
question
Engineering, 04.07.2019 18:20
Select any two (2) areas of applications of chain-drive. (clo4) a)-permanent lubrication necessary b)-hydraulic forklift truck operation c)-rigging and heavy moving materials d)-relatively high maintenance costs e)-costlier than belt drives
Answers: 2
You know the right answer?
Reference Parameters (returning multiple values): Write a C++ function that converts standard time t...
Questions
question
Mathematics, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00