Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a C++ program that prompt the user to input the elapsed time for an event in seconds (integer data type). The program then

image text in transcribed

1. Write a C++ program that prompt the user to input the elapsed time for an event in seconds (integer data type). The program then outputs the elapsed time in hours, minutes, and seconds. (Example: if the user entered: 9630 the output will be: 2:40:30) 2. Write a C++program to find the roots of quadratic equation, and also display a message to describe the roots: i.e 2 real roots xi and x2 1 root (X2) no real roots, 2 complex roots Hint: Quadratic equation is a second order polynomial with 3 coefficients a, b, c. The quadratic equation is given by: ax+ bx+c-o The solution to the quadratic equation is given by 2 numbers x andx We can change the quadratic equation to the form of (x-x(x-x2)0 Quadratic Formula The solution to the quadratic equation is given by the quadratic formula CU The expression inside the square root is called discriminant and is denoted by A: The quadratic formula with discriminant notation: r1.2- 0 This expression is important because it can tell us about the solution when > 0, there are 2 real roots x1+b+VA)/(2a) and X21(-b-VA)/(2a) When . 0, there is one root x1#x2-b/(2a) when

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is conservative approach ?

Answered: 1 week ago

Question

What are the basic financial decisions ?

Answered: 1 week ago

Question

What is meant by 'Wealth Maximization ' ?

Answered: 1 week ago