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]
3 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]3 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
Describe the pace of change in ICT
densk [106]

Answer:

Information and communications technology is an extensional term for information technology that stresses the role of unified communications and the integration of telecommunications and computers, as Technology Trends 2016

#1: Spreading intelligence throughout the cloud. ...

#2: Self-managing devices. ...

#3: Communication beyond sight and sound. ...

#4: Fundamental technologies reshaping what networks can do. ...

#5: Weaving security and privacy into the IoT fabric.

Explanation:

look for a question that i have answered answer it and also plz give me brainliest on this one plz

4 0
2 years ago
How to solve level 53 on rapid router?
alexgriva [62]

&lt;img src=/static/game/image/actions/go.svg alt=' + ugettext(play= button)= += '= style=width: 4%;&gt; ) def noPermissionMessage():

6 0
1 year ago
Write a java program that asks the student for his name and Favorite basketball team. The program should then welcome the studen
bixtya [17]

The java program is an illustration of sequential programs

<h3>What are sequential programs?</h3>

Sequential programs are programs that do not require loops or conditions

<h3>The actual program</h3>

The program written in Java, where comments are used to explain each line is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 //This creates a Scanner Object

 Scanner input = new Scanner(System.in);

 //This declares the variables

 String name, team;

 //This prompts the user for name

 System.out.print("Name: ");

 //This gets an input from the user

 name = input.nextLine();

 //This prompts the user for favorite team

 System.out.print("Favorite team: ");

 //This gets an input from the user

 team = input.nextLine();

 //This prints the required output

 System.out.print("Welcome, "+name+". Cheers to "+team+" team");

}

}

Read more about sequential programs at:

brainly.com/question/26642771

7 0
2 years ago
Read 2 more answers
To draw a clustered cylinder chart, first select the data to be charted and then click the column button (insert tab | charts gr
d1i1m1o1n [39]
It is true that to <span>draw a clustered cylinder chart, first select the data to be charted and then click the column button (insert tab | charts group).</span>
5 0
3 years ago
Should you ever force a CPU into<br>its socket?​
tatyana61 [14]

Answer:

no you should not force a cpu into its socket.

Explanation: on an intel platform the pins are on the motherboard, therefore if you force it in it will damage the pins on the motherboard, and on AMD the pins are on the cpu itself so you can damage the extremely fragile pins on it, you can not shock your cpu however like the other answer.

7 0
3 years ago
Other questions:
  • What is the output of the following program?
    8·1 answer
  • You have to communicate a signal in a language that has 3 symbols A, B and C. The probability of observing A is 50% while that o
    11·1 answer
  • How do I change my keyboard's debounce time?
    15·2 answers
  • Identify and explain the three tiers of web-based applications.
    15·1 answer
  • A Windows user has been successfully saving documents to the file server all morning. However, the latest attempt resulted in th
    9·2 answers
  • Is spread spectrum transmission done for security reasons in commercial WLANs?
    13·1 answer
  • Software is nothing but a piece of code or set of instructions written in a chip to run a hardware device on the Computer. O Tru
    14·1 answer
  • Write an algorithm that accepts two numbers,
    7·1 answer
  • _______ is a medium-range wireless network. ________ is a medium-range wireless network. Cellular radio LTE UWB Wi-Fi
    12·1 answer
  • a value-returning method must specify as its return type in the method header. question 18 options: a) an int b) a double c) a b
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!