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
Several NEC® sections contain the requirement to size conductors and overcurrent devices at 100 percent of the noncontinuous loa
9966 [12]

Answer:

125 percent of continuous load

Explanation:

8 0
3 years ago
A digital camera is an_____​
garik1379 [7]

ITS ABOUT DRIVE

ITS ABOUT POWER

WE STAY HUNGRY

WE DEVOUR

PUT IN THE WORK

PUT IN THE HOURS ⌚

AND TAKE WHATS OURS

Explanation:

fr what is it?

7 0
3 years ago
Read 2 more answers
Does anyone know what this logo is??
scoray [572]

Answer:

I have got no idea it looks like an older style

8 0
2 years ago
Read 2 more answers
A(n) _____ describes your core values and highest career goals. A. résumé B. objective statement C. qualifications profile D. pe
Juli2301 [7.4K]

Answer: D.) Personal Mission Statement

Explanation: The personal mission statement refers to a write up which is usually written by an individual and it's tailored to embody one's complete definition in terms of core values, skills, attributes and most importantly present and future desires, goals and objectives. The statement of purpose is usually detailed and will showcase where an individual is currently placed while also showcasing how he or she intends to achieve future aspiration.

8 0
3 years ago
Read 2 more answers
How long does a baby dolphin stay with its mum
g100num [7]
The nursing usually takes up to 18 months, i.e. one year and a half.

The baby dolphin may however remain with his mum for up to 3-6 years.
5 0
3 years ago
Other questions:
  • All formulas that begin with =IF will
    5·1 answer
  • Which windows tool can you use to find out if the hard drive is slowing down windows performance?
    9·1 answer
  • Which one of these do not belong on the Do's list in Helpful Hints when preparing a presentation: Which one of these do not belo
    8·1 answer
  • An HTML document is composed of ______ that represent distinct items in the Web Page, such as a paragraph, the page heading, or
    9·1 answer
  • In an URL what does the domain name describe?
    14·1 answer
  • PLEASE HURRY!!!!<br> Look at the image below
    8·1 answer
  • With which type of test question should you leave yourself extra time to answer?
    14·2 answers
  • How do we “read” and “write” in MAR and MDR memory unit, please help I am very confused :)
    10·1 answer
  • Which tags do you use to write the header and items of an ordered list on a web page?
    14·1 answer
  • 9. Which of the following is considered an interface? (1 point)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!