Write a function called hms_to_secs() that takes three int values—for hours, minutes, and seconds—as arguments, and returns the equivalent time in seconds (type long). Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.

Answers

Answer 1

Solution:

#include<iostream>

using namespace std;

class timeconvert//class

{

     public:

         int hms_to_secs(int h,int m,int s)//function of the class

               {

                   return (h*3600+m*60+s);

               }

};

int main()

{       timeconvert obj;//creating object of the class

       int h,m,s,total;

       cout<<"enter hour";

       cin>>h;

       cout<<"enter minute";

       cin>>m;

       cout<<"enter second";

       cin>>s;

       total=obj.hms_to_secs(h,m,s);//function call

       cout<<"total second of"<<h<<":"<<m<<":"<<s<<"="<<total;

}

/*

sample output:-

enter hour12

enter minute59

enter second59

total second of12:59:59=46799

*/

Answer 2

In this exercise we have to use the computer language knowledge in C++ to write the code as:

the code is in the attached image.

In a more easy way we have that the code will be:

#include<iostream>

using namespace std;

class timeconvert//class

{

    public:

        int hms_to_secs(int h,int m,int s)//function of the class

              {

                  return (h*3600+m*60+s);

              }

};

int main()

{       timeconvert obj;//creating object of the class

      int h,m,s,total;

      cout<<"enter hour";

      cin>>h;

      cout<<"enter minute";

      cin>>m;

      cout<<"enter second";

      cin>>s;

      total=obj.hms_to_secs(h,m,s);//function call

      cout<<"total second of"<<h<<":"<<m<<":"<<s<<"="<<total;

}

/*

sample output:-

enter hour12

enter minute59

enter second59

total second of12:59:59=46799

*/

See more about C++ code at brainly.com/question/25870717

Write A Function Called Hms_to_secs() That Takes Three Int Valuesfor Hours, Minutes, And Secondsas Arguments,

Related Questions

Put the steps in order to produce the output shown below. Assume the indenting will be correct in the program.


5 2

5 3

8 2

8 3
plz help ill give brainliest

Answers

Answer:

for numB in [5,8]:

     for numA in [2,3]:

            print(numB, numA)

Explanation:

Looking at the given output it can bee sent that the first numbers are repeated twice consecutively and the second numbers in a sequence.

This means that nested loops are used.

Assuming that the indentation will be correct in the program

The code in squence is:

for numB in [5,8]:

     for numA in [2,3]:

            print(numB, numA)

Answer:

Line 1: for numB in [5,8]

Line 3: print (numB, numA)

Line 2: for numA in [2,3]

Explanation:

frrrrrrrrrrreeeeeeeeee brainliest for u

Answers

Answer:

thank you, have a nice day!

Explanation:

How are you and how have you been?

Is this statement true or false? Factual data is always the best data because it is based on facts. true false

Answers

The answer is true do you want an explanation to go with the answer

Answer:

The statement is true

Explanation:

In order to sell a new product to a store owner, taking the store owner into trust is the most important stage. We must provide proper details and the proofs that our product will make his business more effective. All of the above statements are part of the deal and they can be used to assure the store owner that the product we are selling to him is trustworthy.  

Write the correct opening and closing tags on the different commands.​

Answers

Answer:

First column is openings and second is closings. <3

Head - <HEAD> and </HEAD>

Title - <TITLE> and </TITLE>

Body - <BODY> and </BODY>

Bold - <B> and </B>

Underline - <U> and </U>

Heading1 - <H1> and </H1>

Heading Group - <HGROUP> and </HGROUP>

Section - <SECTION> and </SECTION>

Article - <ARTICLE> and </ARTICLE>

Aside - <ASIDE> and </ASIDE>

Which term describes a web address such as www.еdgеnuitу.com?
Option 1. DNS
Option 2. ISP
Option 3. domain name
Option 4. IP address

Answers

Answer:

C.

READ BELOW

Explanation:

A DNS LOOKS LIKE (DNS Primary: 8.8.8.8 Secondary: 8.8.4.4)

AN ISP is a internet service provider. For example (Comcast LLC)

A DOMAIN NAME IS (the name of a url www. [domain name] .com, .org, .gov)

an Ip address is an identifier of your computer, and it looks similar(all are unique) to [64.233.191.255]

Answer:

Domain Name

Explanation:

I just did the Instruction/Assignment on EDGE2022 and it's 200% correct!

Also, heart and rate if you found this answer helpful!! :) (P.S It makes me feel good to know I helped someone today!!)

Which code causes a ValueError?

int('4')

3 / 0

int('four')

3 / 2.0

Answers

Answer:

Option 3: int('four') is the correct asnwer

Explanation:

ValueError occurs in Python when we try to store wrong content in the datatype or conversion.

For example, if we try to store a string in integer datatype.

From the given options,

int('four') will produce a ValueError because "four" is a string and cannot be converted to integer data type.

Hence,

Option 3: int('four') is the correct asnwer

Manfred wants to include the equation for the area of a circle in his presentation. Which option should he choose?

Answers

Answer: The answer is D Insert tab of the ribbon, choose equation and select the equation from the default options

Explanation:

When you go to the insert tab of the ribbon you choose equation and select the equation from the default options. I know this because I went back and I tried each one of these out and none of them made sense so it’s D. I also did the review and got it right

Answer:

Explanation: edge 2022

Mark and his team are working on a project that is due for delivery in the next few days. The team is using project management tools to implement a set of new client requirements. Which activity are Mark and his team performing? A. managing integration B. managing change C. managing quality D. managing timelines

Answers

Answer:

The correct option is;

B. Managing change

Explanation:

Change management is a process of applying methods and instruments that bring about the implementation of required changes in an organization or project such that the changes are carried out in a seamless and timely manner using a carefully laid out and thorough approach that reduces the impact of the change on the quality of service and that handles the disruptions in the project or organization brought about by the change

Which of the following statements are true regarding models? Select 3 options.

In a model, the general characteristics are separated from the details.

Models help predict how a specific solution will respond.

Models help you understand a complex situation by including all of the details.

Models represent the system or problem at a detailed implementation level.

Models help communicate a design.

Answers

Answer:

Answer:

Models help predict how a specific solution will respond

In a model, the general characteristics are separated from the details

Models help communicate a design

Explanation:

The statements that are true regarding models are:

B. Models help predict how a specific solution will respond.

A. In a model, the general characteristics are separated from the details.

E. Models help communicate a design.

What is a model?

A model is an artificial representation of an object or a process. Models are used to show the process or things that are very big and can not be understood by the actual thing.

By looking for patterns in a set of input data, predictive modeling uses mathematics to foretell future events or results.

Therefore, the correct options are A. In a model, the general characteristics are separated from the details, B. Models help predict how a specific solution will respond, and E. Models help communicate a design.

To learn more about the model, refer to the link:

https://brainly.com/question/14281845

#SPJ2

when installing a Windows 10 an already installed Windows 7 what happen​

Answers

Answer:

are u updating it? or u r rooting it?

Answer:

If you've already installed Win7, the boot media *should* realize, and so the Windows 7 data gets overwritten with Windows 10 and all personal data stays intact. This is known as an upgrade, rather than just replacing.

Only text values can be displayed as a part of <TD> and <TH> tags.
True or False? ​

Answers

Answer:

I'm not sure but I think its true

What type of file format is PSD?

Answers

Answer:

PSD (Photoshop Document)

Explanation:

PSD (Photoshop Document) is an image file format native its one of Adobe's popular Photoshop Application. PSD files are commonly used for containing high quality graphics data.

Answer:

PSD (Photoshop Document) is an image file format native to Adobe's popular Photoshop Application. It's an image editing friendly format that supports multiple image layers and various imaging options. PSD files are commonly used for containing high quality graphics data.

Format Creator: Adobe Inc.

Explanation:

what is a cpu and what does it do

Answers

The CPU is the brain of a computer, containing all the circuitry needed to process input, store data, and output results. The CPU is constantly following instructions of computer programs that tell it which data to process and how to process it.

The central processing unit (CPU) is known as the brain of the computer it also takes the raw data and turns it into information.

whats 12/29 divided by 12/34

Answers

Answer:

1.17

Explanation:

12 ÷ 29 = 0.414

12 ÷ 34 =  0.353

0.414 ÷ 0.353 = 1.17 or 1 17/100

The division of fraction 12/29 divided by 12/34 gives 34/29.

To find 12/29 divided by 12/34:

Step 1: Find the reciprocal of the second fraction, 12/34:

Reciprocal of 12/34 = 34/12

Step 2: Multiply the first fraction by the reciprocal of the second fraction:

(12/29) ÷ (12/34) = (12/29) * (34/12)

Step 3: Simplify the multiplication:

(12/29) * (34/12) = (12 * 34) / (29 * 12)

Step 4: Further simplify the multiplication:

(12 * 34) = 408

(29 * 12) = 348

Step 5: The final result:

(12/29) ÷ (12/34) = 408/348

Now, GCD(408, 348) = 12

So, the simplified fraction will be as

(408 ÷ 12) = 34

(348 ÷ 12) = 29

Thus, the final simplified result is 34/29.

Learn more about Fraction here:

https://brainly.com/question/10354322

#SPJ6

DDL statement for adding a column to an existing table is

Answers

Answer:to add a column to existing table.

to rename any existing column.

to change datatype of any column or to modify its size.

to drop a column from the table.

Explanation:

hope this help

Biosolids are used as a chemical free natural choice for fertilizing.

Answers

Answer:

is this a true or false? I dont really understand. this is a statement not a question.

Question #1
Multiple Select
Which features are important when you plan a program? Select 4 options.
Knowing what the user needs the program to accomplish.
Knowing how to find the result needed.
Knowing how many lines of code you are allowed to use.
Knowing what information is needed to find the result.
Knowing what you want the program to do

Answers

Answer:

Multiple Select

Which features are important when you plan a program? Select 4 options.

Knowing what the user needs the program to accomplish.

Knowing how to find the result needed.

Knowing what information is needed to find the result.

Knowing what you want the program to do

Explanation:

It is the other 4, and not Knowing how many lines of code you are allowed to use.

A program refers to software that is written by computer experts to help users to accomplish certain special tasks. The features that are important when you plan a program are;

Knowing what the user needs the program to accomplish. Knowing how to find the result needed. Knowing what information is needed to find the result. Knowing what you want the program to do

To successfully plan a program, the programmer ought to know what the intention of the user is. It could be for communication, blogging, advertisement, etc.

Next, you need to know how to write the code. Java, HTML, etc are possible programming languages that can be used to do this.

A good grasp of the information needed to write the code is also necessary.

Learn more here:

https://brainly.com/question/20057346

I WILL MARK YOUR BRAINLIEST IF YOU ANSWER

Draw a flowchart to print first 10 multiples of 5.
Please also draw it on paper and answer

SILLY ANSWERS = REPORT!

Answers

Answer:

Explanation:

Sorry it's very messy, for this a loop is need but inclusive of a count/index variable which I have used and called the variable 'number'

James is writing a program in C++ and forgets to put curly braces where they are supposed to be. James will see a message about which of the following when the program is run? database error variable error binary error syntax error

Answers

Answer:

syntax error

Explanation:

curly braces demarkate code blocks. omitting them and code may violate the syntax, hence produce a syntax error.

Some Word processors miss some errors because....?

Answers

“She could sew seeds better than she could sew clothes.”

The above sentence is one that I came across while reading a self-published novel the other day, and is a perfect example why one cannot merely rely on a spell-checking program to ensure that one’s writing is error-free. Although “sew” and “sow” are homophones (they sound the same despite having different spellings and meanings), they are obviously not interchangeable: When you write phrases such as, “In miss you,” “I’ll pick the care up from the garage,” or, “We’re having meet for dinner,” SpellCheck doesn’t catch any errors, because none of the words are actually misspelled. The same thing goes for Word and other word-processing softwaresow seeds, and sew clothes.

What are the benefits and risks of a client-server network?

Answers

Answer:

Ermm... i don't really know but probably

the benefits can be: multi device connection and can be upgraded.

The disadvantages: The server is expensive i think, a special staff like  a network manager  is needed, and if any single part of the system fails a whole lot of disruption can come.

hope this helps!

Is this statement true or false?



It is always better to run over and give more information when you are giving a presentation versus quitting on time.


true

false

Answers

Answer:

THIS IS TRUE

Explanation:

but try to hurry up if the time is about to finish or try to find a quick way to wrap it up if the timing is too strict.

Hope this helped :)

This is a very true statement

What operating system is a smart phone most likely to use?
A) BSD
B) Mac OS X
C) Symbian
D) Linux

Answers

Answer:
Linux

Reason:
According to Google, BSD is discontinued. Symbian is also discontinued. Linux is on some smartphones. Max OS X are for computers.

Hope this helped!

Answer: it's C) Symbian

Explanation: trust me bro

Give four examples of Graphic and Streaming media capabilities to have in a computer​

Answers

Answer:

A GPU would be needed for graphic capabilities

Lots of RAM would be needed for streaming

CPU would be essential to graphic and streaming capabilities

Cooling is essential to a good experience for graphic and streaming

Hope this helped, brainliest appreciated :)

What symbol indicates that material has been copyrighted?

Answers

Answer:

Ermmmmmm...

I Think if a thing doesn't hhave a trademark or something like that.

Explanation:

Up there

Answer: I believe it’s the circle one with the c, sorry if I’m rong ༼つ ◕◡◕ ༽つ

Explanation:

Why should you create folders when saving files?

Answers

Answer:

it keeps your work organised

Explanation:

Answer:

You can create folders to store and organize your pictures , your videos and soon . Folders are also used to separate the files created by diffrent users.

Select the correct answer. Dawna is working on a term paper using a word processor. She has saved each draft of her paper as a separate version. She wants to include a section from an earlier draft in her current document. What should she do? ОА. refer to the earlier draft and type the section again in her current document cut the section from the earlier draft and paste it in the current document OB Oc. save the eadler draft with a new name and work in it OD copy the section from the earlier draft and paste it in the current document Reset Next​

Answers

Answer:

D. copy the section from the earlier draft and paste it in the current document

Explanation:

A word processor can be defined as a software application or program designed to avail the end users the ability to type and format text documents for various purposes.

Some examples of word processors are Microsoft Word, Notepad, etc.

In this scenario, Dawna is working on a term paper using a word processor. She has saved each draft of her paper as a separate version. She wants to include a section from an earlier draft in her current document.

Therefore, what she should do is to copy the section from the earlier draft and paste it in the current document.

A copy or cut is a formatting technique used for copying and cutting (removing) textual informations from a document respectively.

Hence, Dawna should copy the section from the earlier draft rather than cut, so as to maintain the information in the draft for any future reference or use.

write a code to test if a number is equal to 89 or 78

Answers

number = whatever value you want

if number == 89 or number == 78:

   print("The variable number equals 89 or 78.")

else:

   print("The variable number does not equal 89 or 78.")

Multiple Choice
Technological skills are not necessary to pursue a career in marketing.
O True
O False

Answers

Answer:

O False

Explanation:

The answer would be false

Select the correct answer. Which engineering professional communicates potential flaws in product design? A. maintenance engineer B. design engineer C. analysis engineer D. inspection engineer E. field engineer

Answers

the correct answer is the letter C. plz mark me the brainliest!!1

Answer:

the answer is c

Explanation:

Make the other dude/girl brain list, he answered first after all, and I got it right on the test thx to him.

Other Questions
Do you think the final version of the US Constitution created a political system that gives too much, too little or just enough power to the central government? Which is the best title for this list ? Dante Alighieri Miguel de Cervantes William Shakespeare Niccol Machiavelli I really need help ASAPcrivons Remets les lments de chaque phrase dans le bon ordre.1. non merci / en / ne... pas / je /veux2. adore / les pches / mange /j/beaucoup /j'/ en / et3. des petits pois / tu / il y a / veux / en / si4. nous / avons / en / deux5. maman / pour le diner / souvent / prpare / en6. en / vous / est-ce que / avez / deux Help me please I have to have this done in 5 minutes Please help! Qu aprend de este pasaje?Qu no entiendo de este pasaje?En un prrafo (no less than 5 sentences) traduce este pasaje a ingls. 5. A sample of methane has a volume of 225 mL at 0.650 atm of pressure. What will the new volume be if thepressure is increased to 1.25 atm? . . . "That all mankind did spring from one original, and that there are no different species among men. For God who made the world, hath made of one blood all the nations of men that dwell on all the face of the earth." Thoughts and Sentiments on the Evil and Wicked Traffic of the Slavery and Commerce of the Human Species, Quobna Ottobah Cugoano What belief is implied but not explicitly stated in the passage? There are no different species among men. Some nations are superior to others. God made the world. All people are created equal. A polynomial of the 5th degree with a leading coefficient of 7 and a constant term of 6 What countries were competing for land in North America? Can a Diary explain what I'm doing and why I am doing it? The reason why I am asking this question is; If I am writing a diary, then I should know why I did something. I'm really confused. please help me out What is the range of the graph? How do you do this question? Choose the word that means "a type of decorative writing."ArabesqueMinaretCalligraphy help me im really bad at this stuff PLS help, this is for a school assingment and i dont know what to answer. I am not trying to be rude to LGBTQ people, as I myself am part of the lgbtq community (Im Bi). but pls help. Should LGBTQ people have the same rights as others, why or why not answer in 3-4 sentances??? New Orleans jazz music was usually played by bands. Which of these instruments would NOT be found in a New Orleans jazz band? A wall that cannot be moved because it is carrying the weight of the roof is considered a wall Example sentence of subjugate Which words or phrases describe the Aryan people? Choose three correct answers.A. nomadsB. herdersC. farmersD. settlersE. warriors What time of year is being described in the first six lines of the poem "there will come soft rains"