1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
liberstina [14]
3 years ago
8

3. Write a function elapsed_time that takes as its arguments two time structures and returns a time structure that represents th

e elapsed time (in hours, minutes, and seconds) between the two times. So the call
elapsed_time (time1, time2)
where time1 represents 3:45:15 and time2 represents 9:44:03, should return a time structure that represents 5 hours, 58 minutes, and 48 seconds. Be careful with times that cross midnight
Computers and Technology
1 answer:
kumpel [21]3 years ago
3 0
Pseudocode for the function

time elapse_time(time time1, time time2)
{
/* hour */
if (time2.hr >= time1.hr) then
elapse_time.hr = time2.hr - time1.hr;
else /* pass mid night */
elapse_time.hr = 24 + time2.hr - time1.hr;
endif
/* min */
if (time2.min >= time1.min) then
elapse_time.min = time2.min - time1.min;
else
elapse_time.hr = elapse_time.hr -1;
elapse_time.min = 60 + time2.min - time1.min;
endif
/* sec */
if (time2.sec >= time1.sec) then
elapse_time.sec = time2.sec - time1.sec;
else
elapse_time.min = elapse_time.min -1;
elapse_time.sec = 60 + time2.sec - time1.sec;
endif
return elapse_time;
}
You might be interested in
A chemical found in the synaptic vesicles , which , when released . has an effect on the next cell is called a?
ruslelena [56]
Neurotransmitters is the chemical found in the synaptic vesicles that, when released, has an effect on the next cell.
7 0
4 years ago
Which option is the easiest way to configure macros in Access 2016?
zhuklara [117]
Number 2
Have a nice day
6 0
3 years ago
______ is a slow process that takes place in nature. (2 points)
netineya [11]

Natural Selection.


♣Amaranthine
6 0
3 years ago
You should hand write your references on your resume.
adelina 88 [10]
This can be taken to mean a couple of things.
Overall - no - nothing on your resume should be written in by hand. If it’s going to be included on your resume it needs to be typed in and turned in at the same time as that resume. However, it’s not unusual for people to submit their references secondary to the initial submission of their resume. In that case what you can do is list a section on your resume that’s called References and underneath state “References available by request.” If they are then requested later, turn them in typed neatly on a document that matches your resume.
4 0
3 years ago
Read 2 more answers
This is for the folks that is rude:
S_A_V [24]
This isn’t twitter but anyways the answer is 29
8 0
4 years ago
Other questions:
  • Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the g
    12·2 answers
  • Where does the VLookup function find its lookup values?
    14·1 answer
  • How do you take a screen shot with a toshiba computer?
    13·2 answers
  • Que es lo que me recomiendan estudiar? :v
    10·1 answer
  • What type of html list will automatically place a number in front of the items?
    9·1 answer
  • Which of the following is a scam where perpetrators promise high pay for working on different projects like wooden calendars, pa
    13·1 answer
  • Complete the sentence about entering and editing data in a cell in a spreadsheet.
    13·1 answer
  • Describe a situation in which a robot may have to avoid an obstacle without coming to a complete stop before turning.
    10·2 answers
  • द्विआधार जोड गर (Binary<br>addition):<br>-<br>(i) 1012 + 1112<br>(ii) 1112 + 100​
    15·1 answer
  • Which computer are used by mobile employees such as meter readers.​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!