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
An inserted graphic in Excel is
telo118 [61]
<h2>Answer:</h2>

<u>An inserted graphic in Excel is </u><u>B. inserted in the active cell.</u>

<h2>Explanation:</h2>

A graphic is considered as any picture or shape present in the directory of any computer. So when you are working in an Excel worksheet and you insert any graphic so it means you have inserted a shape. It may be a line, picture or any other geometrical shape, then this image or graphic will be inserted in the cell which is active at that time and no where else. Therefore option B is the correct answer.

7 0
4 years ago
Read 2 more answers
What are the document involved in E payment​
worty [1.4K]

An e-payment system is a way of making transactions or paying for goods and services through an electronic medium, without the use of checks or cash. ... As the world advances more with technology development, we can see the rise of electronic payment systems and payment processing devices.

8 0
3 years ago
Populate a stack with ten random integers and empty it by showing that the order of the elements is reversed, from last to first
Anuta_ua [19.1K]

Answer:

class Main {  

 public static void main(String args[]) {

   Deque<Integer> stack = new ArrayDeque<Integer>();

   Random rand = new Random();

   for(int i=0; i<10; i++) {

       int n = rand.nextInt(100);

       System.out.printf("%02d ", n);

       stack.push(n);

   }

   

   System.out.println();

   

   while(stack.size() > 0) {

       System.out.printf("%02d ", stack.removeFirst());

   }

 }

}

Explanation:

example output:

31 18 11 42 24 44 84 51 03 17  

17 03 51 84 44 24 42 11 18 31

4 0
3 years ago
If you see an advertisement for a 3TB portable drive, this is most likely a reference to the device having a capacity of three _
s2008m [1.1K]
Terabytes






---------------------------------
4 0
3 years ago
A job placement agency helps match job seekers with potential employers. The agency
padilas [110]

Answer:

The answer is "Option C".

Explanation:

Please find the complete question in the attached file.

The model presented above is an AI design. The specific variable within each AI model becomes reduced. There is also no AI model showing 100% reliability, or just not as reliable as just a man in certain situations. That is why the option C opposes this fact explicitly, and that model is least likely to benefit.

4 0
3 years ago
Other questions:
  • You buy a $3,500 car and finance it through the car dealer. the contract says if you are two months delinquent with your payment
    9·1 answer
  • What are the role, responsibilities, and required background of the production designer of a film?
    6·1 answer
  • Universal Containers offers a variety of products that are comparable to products from other companies. Sales representatives re
    14·1 answer
  • The problem analysis phase typically includes which of the following tasks? (Points : 2) Negotiate baseline scope.
    10·1 answer
  • Why would an information systems security practitioner want to see network traffic on both internal and external network traffic
    5·1 answer
  • Adobe gives away the Acrobat Reader to build a market for the sale of software that creates Acrobat files. This is an example of
    5·1 answer
  • 54 points!!! Cyber security
    14·1 answer
  • Carmen has met new people online that she enjoys talking to. One of these people has asked her to meet at the park in person and
    15·1 answer
  • Please help……Your friend is taking images from all over the internet without giving credit to the sources. He tells you that it’
    6·1 answer
  • According to the selection, speech-software developers are still striving to develop speech-recognition technology that —
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!