Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Rational fractions are of the form alb, in which a and b are integers and bO. In

ID: 3607235 • Letter: R

Question

Rational fractions are of the form alb, in which a and b are integers and bO. In this exercise, by "fractions" we mean rational fractions. Suppose alb and cld are fractions. Arithmetic operations on fractions are defined by the following rules: a/b + c/d = (ad + bc)/bd a/b-c/d = (ad-bc)/bd (alb)/(c / d) = ad/bc; in which b #0 Fractions are compared as follows: alb op cld ifad op bc, in which op is any of the relational operations. For example, alb xi should store 2/3 in x. The statement should output the value of x + y in fraction form. The statement should store the sum of x and y in z in fraction form. Your answer need not be in the lowest terms.

Explanation / Answer

#include #include using namespace std; int main() { float a, b, c, x1, x2, discriminant, realPart, imaginaryPart; cout > a >> b >> c; discriminant = b*b - 4*a*c; if (discriminant > 0) { x1 = (-b + sqrt(discriminant)) / (2*a); x2 = (-b - sqrt(discriminant)) / (2*a); cout