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
List of bad websites and why
r-ruslan [8.4K]

Penny Juice – bad design examples.

Blinkee website – bad design example.

Great Dreams I — bad designed website.
8 0
2 years ago
In Microsoft Word, when you highlight existing text you want to replace, you are in
kirill115 [55]
The correct answer is C. Typeover mode

This is when you select a text and can then type over it and it automatically replaces it with what you're writing. It also creates a little box that lets you edit the selected part easily if that's what you need with things like bold or italic or change the text color.
6 0
3 years ago
If your cpu usage levels are greater than ___________% during most of your work session, a faster CPU can greatly increase your
motikmotik

Answer:

If your cpu usage levels are greater than 90% during most of your work session, a faster CPU can greatly increase your computer's performance

Explanation:

CPU usage level is a good indicator for the computer performance.

Generally, computers use a low portion of their CPU power. When you open an application or listen to music on your computer, CPU usage level increases. After CPU intensive process ends, the CPU usage should drop to lower level again.

But if the CPU usage level is high all the time you use the computer, then it means that either there is a problem causing continuous CPU usage or your CPU is not fast enough. In the case of latter, you'd better to have a faster CPU.

6 0
3 years ago
Implement a function named largerThanN that accepts three arguments: an array of type int, the size of the array of type int and
levacccp [35]

Answer:

import java.util.Scanner;

public class NewArray {

//Main Method begins here

   public static void main(String[] args) {

   int [] numbers = {30,20,50,2,-1,44,3,12,90,32}; //The given array

   Scanner in = new Scanner(System.in);

       System.out.println("enter a number");

       int n = in.nextInt(); //Receive the number from the user

       //Calling the method largerThanN

       largerThanN(numbers, numbers.length,n);

   }

//The method largerThanN begins here

   public static void largerThanN(int []intArray, int arraySize, int n){

       for(int i = 0; i < intArray.length; i++){

           if(intArray[i] > n){

               System.out.println(intArray[i]);

           }

       }

   }

}

Explanation:

Uisng the Java prograamming language the solution is provided above.

Please see the comments within the code for detailed explanation

The key logic within the method largerThanN () is using a for loop to iterate the entire array. Within the for loop use an if statement to compare each element with the the number n entered by the user

6 0
3 years ago
Pressing the _____ key when entering title text in a placeholder creates a new paragraph. BACKSPACE SHIFT DELETE ENTER
Lunna [17]
Enter would create a new line, thus allowing you to enter a paragraph, on some applications you can use "Shift+Enter" if it is an IM application like Skype.
4 0
3 years ago
Other questions:
  • How do you ask someone for help?
    6·1 answer
  • Match the items.
    15·1 answer
  • Suppose your friend, who is a small business owner, wants to computerize her business functions such as accounting, payroll, and
    7·1 answer
  • Which type of text may be formatted to print at the bottom of every page?
    6·1 answer
  • You should check your battery ___________. Every week Never Every six months Every 30,00 miles
    8·2 answers
  • Which of the following is true about a hot site?
    13·1 answer
  • Rob used Track Changes to suggest changes in Jack's document. Jack agrees with some edits and disagrees with others. What should
    14·1 answer
  • Write JavaScript code to declare a variable of the name favoriteColor
    13·1 answer
  • have you ever had to adjust your communicatio style to egage a customer or roommate? what was the situation and outcome?
    5·1 answer
  • THis took FOREVER! please go check it out, if you have seen my demo to this game, you will like the full version! https://scratc
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!