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
andrew-mc [135]
4 years ago
7

Flesh out the body of the print_seconds function so that it prints the total amount of seconds given the hours, minutes, and sec

onds function parameters. Remember that there are 3600 seconds in an hour and 60 seconds in a minute.

Computers and Technology
1 answer:
fiasKO [112]4 years ago
8 0

Answer:

Step by step explanation along with code and output is provided below

Explanation:

#include<iostream>

using namespace std;

// print_seconds function that takes three input arguments hours, mints, and seconds. There are 60*60=3600 seconds in one hour and 60 seconds in a minute. Total seconds will be addition of these three  

void print_seconds(int hours, int mints, int seconds)

{

   int total_seconds= hours*3600 + mints*60 + seconds;

   cout<<"Total seconds are: "<<total_seconds<<endl;

}

// test code

// user inputs hours, minutes and seconds and can also leave any of them by  entering 0 that will not effect the program. Then function print_seconds is called to calculate and print the total seconds.

int main()

{

   int h,m,s;

   cout<<"enter hours if any or enter 0"<<endl;

   cin>>h;

   cout<<"enter mints if any or enter 0"<<endl;

   cin>>m;

   cout<<"enter seconds if any or enter 0"<<endl;

   cin>>s;

   print_seconds(h,m,s);

  return 0;

}

Output:

enter hours if any or enter 0

2

enter mints if any or enter 0

25

enter seconds if any or enter 0

10

Total seconds are: 8710

You might be interested in
What kind of block do you need to check whether a sprite is touching another sprite?
Mila [183]

A event block i know this im i have been in technology for 5 months

7 0
3 years ago
FREEFREEFREEFREEFREEFREE
Brrunno [24]

Answer:

niceeee :0

Explanation:

5 0
3 years ago
Read 2 more answers
You are about to install a new USB camera on your Linux system and you realize that there is no device special file available fo
Nonamiya [84]

Answer:

mknod

Explanation:

When the user wants to configure a camera device on his Linux computer and the user recognizes that his device does not have a device-specific file. Thus, the user could use the mknod command on his computer to set up an equipment file because it is the command that is used to create a fresh file and these files are not the same as the normal file.

So, the following answer is correct according to the following scenario.

3 0
3 years ago
Whats included in ms office 2013 professional?
MrMuchimi
Powerpoint, word document, and excel
3 0
3 years ago
What type of link is used to call this file shown below?
Stells [14]

what file i can't see it

3 0
3 years ago
Other questions:
  • Oxygen-18 has an atomic number of 8. How many neutrons are in this isotope?
    7·1 answer
  • Nowadays, most online discussion boards are on Web-based forums that provide a variety of user-friendly tools to create and post
    13·1 answer
  • Given an int as the input, print all the factors of that number, one in each line. For example, if the input is 15 The output wi
    14·2 answers
  • OSHA standards appear in the ___________ and are then broken down into ____________.
    9·1 answer
  • This type of software works with end users, application software, and computer hardware to handle the majority of technical deta
    12·1 answer
  • You might have trouble interpreting a message if:
    15·1 answer
  • The phone in your hand is a computer. So too is the machine that occupies a 100,000 square foot data center. Given their vast di
    14·1 answer
  • Project manager Kevin has to create a project team organizational chart. Which activity should he perform before creating this c
    9·1 answer
  • What is pseudocode? O A way of describing a set of instructions in text form using plain english O A diagrammatic representation
    13·1 answer
  • What does playstation network is currently undergoing maintenance?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!