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
Ilia_Sergeevich [38]
3 years ago
6

In function main prompt the user for a time in seconds. Call a user defined function to calculate the equivalent time in hours,

minutes, and seconds. Parameters should be the time in total seconds and pointers to the hours, minutes, and seconds. Print the equivalent in hours, minutes, and seconds in function main. Test with a value of 36884 seconds Output should look something like this: 5000 seconds can be broken into 1 hour 23 minutes and 20 seconds"

Computers and Technology
1 answer:
Molodets [167]3 years ago
4 0

Answer:

#include <iostream>

#include <cmath>

using namespace std;

int main()

{

   cout<<"Enter time in seconds:";

   int time, hour, minutes, seconds,initialTime;

   

   cin>>time;

   initialTime = time;

   

   hour = floor(time / 3600);

   time = time % 3600;

   minutes = floor(time / 60);

   time = time % 60;

   seconds = time;

   cout<< initialTime<<" can be broken down into: "<<endl;

   cout<<hour << " hour(s)"<<endl;

   cout<<minutes <<" minutes"<<endl;

   cout<<seconds <<" seconds"<<endl;

   return 0;

}

Explanation:

The programming language use is c++

The module cmath was called to allow me perform some math operations like floor division, and the Iostream allows me to print output to the screen. Using namespace std allows me to use classes from the function std.

I prompt the user to enter time in second, then declare all the variables that will be used which include time, hour, minutes, seconds and initialTime.

initialTime is used to hold the the time input entered by the user and will be printed at the end no arithmetic operation is carried out on it.

Floor division (returns the quotient in a division operation) and Modulo (returns the remainder in a division operation) division is used to evaluate the hours, the minutes and the seconds.

The final answers are then printed to the screen.

I have uploaded the c++ file and a picture of the code in action

You might be interested in
The printing press helped spread the ideas of the Renaissance.<br> a. True <br> b. False
guajiro [1.7K]
The answer is a. True

The printing press did help spread the ideas of the Renaissance, as it could spread ideas easily, quickly, and in different languages.

6 0
4 years ago
Which member of the Jackson family was the spokesperson for the Psychic Friends Network.​
Jlenok [28]

Answer:

La Toya Jackson

Explanation:

8 0
3 years ago
Im on Edge 2021 and i did an assignment that says, "Processing." The assignment won't give me a grade and says it is overdue. wh
lora16 [44]

Answer:

you could send a email to your teacher to fix the problem

Explanation:

3 0
3 years ago
How can a classroom be more effective by the use of multimedia? ​
Gekata [30.6K]

Answer:

Multimedia helps the user become more engaged with what they're learning by using multiple different methods to engage the user. When the user is interested or is engaged with his/her work, what he/she is learning becomes more enjoyable allowing the information to stick.

Explanation:

Multimedia is one of the many ways of communicating. It combines many different things including audio, animation, or text, all together which allows the user to interact with these different learning methods and become more interested, because it tries many different learning techniques at once.

A common example of multimedia would be websites such as ABC mouse.com, which allows the user to interact head on with the lessons while using many different things to help the student become more engaged with what they're learning. Things such as mini games, points to earn to buy items, and in-lesson interaction with multiple choice questions. All help the student become engaged/addicted to using the website.

To sum up, how can a classroom be more effective by the use of multimedia? ​"Multimedia helps the user become more engaged with what they're learning by using multiple different methods to engage the user. When the user is interested or is engaged with his/her work, what he/she is learning becomes more enjoyable allowing the information to stick."

Hope this helps.

6 0
2 years ago
Business cards are generally designed so that this item stands out the most.
Sloan [31]
The D. Company Name most likely stands out on a business card with an address or such in smaller font below. A logo does nothing for a business card if a potential customer doesn't even know the name of the business. While logo's are often present on a business card, the company name is far more crucial to enunciate clearly which is of course, important for business's attraction of new customers.

So D. Company Name is my final answer!

Hope this helps! ;)
3 0
3 years ago
Other questions:
  • Write a function file that accepts the values of r, a and n as arguments and uses a for loop to return the sum of the first n te
    9·1 answer
  • The logical view Select one: a. shows how data are organized and structured on the storage media. b. presents an entry screen to
    7·1 answer
  • Inherent flaws in system software code are called:
    7·1 answer
  • The drawback to copyright protection is that the underlying ideas behind the work are not protected, only their manifestation in
    9·1 answer
  • Computer programs and games are called what?
    13·1 answer
  • _____emphasizes on proper breathing and the mind-body-spirit connections.​
    6·2 answers
  • From Blown to Bits why is it important to know what children are doing on the Web Tonight?
    7·1 answer
  • Whose guidelines should you follow for the destruction of storage media such as thumb drives, Zip drives, and computers?
    6·1 answer
  • Compute series multiplier resistors RM = 100Ω:
    8·1 answer
  • JAVA
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!