Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment maps to Chapter 3 and reinforces the use of arithmetic operations in C++. Implement a program that translates the quadratic formula into an

This assignment maps to Chapter 3 and reinforces the use of arithmetic operations in C++.

Implement a program that translates the quadratic formula into an expression. Use the sqrt and pow function to reconstruct this expression.

image text in transcribed

The expression is: x 3x - 10 = 0

Don't worry about making this adapt to other expressions. We don't want to deal with imaginary number cases. We're just trying to prove our competence with arranging the order of operations and expressions. Only use that expression above.

This assigns a, b, and c to:

 a = 1 
 b = -3 
 c = -10 The equation will have to evaluate the + and - case, so the equation should be stored into two separate variables for both cases. 

The roots should read: 5 and -2 in your console window as shown:

image text in transcribed

IMPORTANT:

Your code does not have to account for non real numbers.

Your code will only evaluate the one test expression given to you.

Your code will not deal with equations that have no solutions or roots.

This exercise is a display of proper expression conversion, use of cmath library, and possibly typecasting. Focus primarily on the order of operations. That's what I'm looking for in grading.

Quadratic Formula Example Equation x2+ 2x 10 - 4ac 1 2a a bC

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

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions