Write a C++ program that prompts the user to enter 3 real numbers representing the coefficients...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C++ program that prompts the user to enter 3 real numbers representing the coefficients of the quadratic equation, A, B, and C. Use the quadratic formula to solve the quadratic equation and output the one or two solutions. The output will look like this: Enter a: 2.0 Enter b: 5.0 Enter c: -3.0 There are two real roots and they are -3.0 and 0.5 Enter a: 0.0 Enter b: 5.0 Enter c: -3.0 There are no real roots Enter a: 1.0 Enter b: -3.0 Enter c: 0.0 There are two real roots and they are 3.0 and 0.0 Write a C++ program that prompts the user to enter 3 real numbers representing the coefficients of the quadratic equation, A, B, and C. Use the quadratic formula to solve the quadratic equation and output the one or two solutions. The output will look like this: Enter a: 2.0 Enter b: 5.0 Enter c: -3.0 There are two real roots and they are -3.0 and 0.5 Enter a: 0.0 Enter b: 5.0 Enter c: -3.0 There are no real roots Enter a: 1.0 Enter b: -3.0 Enter c: 0.0 There are two real roots and they are 3.0 and 0.0
Expert Answer:
Answer rating: 100% (QA)
Below is a C program that prompts the user to enter the coefficients of a quadratic equation an... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
Jazz Ltd produces two products X and Y. The enterprise produces both products with the same equipment. Details of the cost activities are as follows: Overhead cost: Rand Material handling 200 000...
-
Draw a dot plot of the televisions per household data from Problem 25. A researcher with A. C. Nielsen wanted to determine the number of televisions in households. He conducts a survey of 40 randomly...
-
1) Explain the term efficient portfolio. 2)How are the security market line and the capital asset pricing model related? 3)Assume you've drawn the efficient frontier and the risk-free rate exists....
-
What are the pros and cons of Sephora carrying more than 200 brands of personal care products?
-
According to Example 3.33. the n n Hilbert matrix Hn is positive definite, and hence we can apply the conjugate gradient method to solve the linear system Hnu = f. For the values n = 5. 10. 30, let...
-
Question 4 The ratios below measure the different aspects of risk metrics and the bank performance of two banks in the Middle East. Bank A Bank B Net Internet Margin (NIM) 2.5% 3.6% Non-Performing...
-
Presented below are the balance sheet accounts of the Mayfair Company as of December 1, 2017. The accounts are listed in random order. During the month of December 2017, the following events...
-
The Daniels Tool & Die Corporation has been in existence for a little over three years. The company's sales have been increasing each year as it builds a reputation. The company manufactures dies to...
-
A local company imports a shipment, the company's Chief Executive Officer is importing a sedan motor vehicle he claims for personal use, which exceeds 1500cc but does not exceed 2000cc. The vehicle...
-
1. Bare cost and total cost (incl. O&P) of formwork for spread footings (20 pts, specify which lines (or index) in RSMeans data are used) 2. Bare cost and total cost of reinforcement for spread...
-
Assume you received note receivable of 5,000,000 carrying 12% nominal interst rate for a period of 6 years. Note pays interest semi annual. On the date of receipt, market rate for similar note is...
-
6.7 Suppose that n = pq is an RSA modulus (i.e., p and q are distinct odd primes), and let a Zn*. For a positive integer m and for any a Zm*, define ordm (a) to be the order of a in the group Zam"....
-
Discuss the elements of a function, function parameters, and function passing. What is the difference between local and global variables?
-
A. Beatrice invests $1,870 in an account that pays 5 percent simple interest annually. How much MORE could she have earned over a 5-year period if the interest had been compounded annually? B. Your...
-
Using the state of New Mexico, research if your state has passed a Tort Reform Act setting limits on damages that can be awarded to a plaintiff. If so, identify the limits and stipulations. If not,...
-
3. [25 points] Consider a plasma flow which is subjected to the constant perpendicular electric and magnetic fields as shown in the figure below. Consider that all heavy particles (ions, neutrals)...
-
2. Consider a household iron whose base plate is made from 1.4 kg of aluminium (p= 2702 kg/m, c = 896 J/kgK, k = 240 W/mK) and has a surface area of 0.046 m. Initially, the iron is in thermal...
-
(a) As Section 17.3 discusses, high-frequency sound waves exhibit less diffraction than low-frequency sound waves do. However, even high-frequency sound waves exhibit much more diffraction under...
-
Programming Exercise 22.12 retrieves the last 100 prime numbers from a file PrimeNumbers.dat. Write a client program that requests the server to send the last 100 prime numbers in an array. Name the...
-
Programming Exercise 7.35 presents a console version of the popular hangman game. Write a GUI program that lets a user play the game. The user guesses a word by entering one letter at a time, as...
-
Write a program that prompts the user to enter a point (x, y) and checks whether the point is within the circle centered at (0, 0) with radius 10. For example, (4, 5) is inside the circle and (9, 9)...
-
Four independent situations are given below. Assume that partners of the existing partnership are Kyle Bowen and Susan Wong. The new partner is Angie Mills. For each situation, prepare the...
-
A cash receipts journal is provided in the Working Papers. Work independently to complete the following problem. David Rice and Tanya Taylor agree to form a partnership on July 1 of the current year....
-
Carmen Estrada and Paula Jeter agree to form a partnership on June 1 of the current year. The partnership assumes the assets and liabilities of Carmens existing business. Paula invests cash equal to...
Study smarter with the SolutionInn App