Homework 2 Output

2
// // Erick Gonzalez // CS 1325 - 002 // September 1st 2013 // Homework 2: Program to solve quadratic equation Output: This program will solve the equation: ax^2 + bx + c = 0 Please enter three values for a, b, and c : 2 3 5 The values you entered are a = 2.00 , b=3.00, c= 5.0 The solutions to the equation are: x1 = -0.75 -1.39i x2 = -0.75 + 1.39i This program will solve the equation: ax^2 + bx + c = 0 Please enter three values for a, b, and c : 3 6 5 The values you entered are a = 3.00 , b=6.00, c= 5.0 The solutions to the equation are: x1 = -1.00 -0.82i x2 = -1.00 + 0.82i This program will solve the equation: ax^2 + bx + c = 0 Please enter three values for a, b, and c : 1 9 2

description

output

Transcript of Homework 2 Output

Page 1: Homework 2 Output

// // Erick Gonzalez// CS 1325 - 002// September 1st 2013// Homework 2: Program to solve quadratic equation

Output:

This program will solve the equation: ax^2 + bx + c = 0Please enter three values for a, b, and c :235The values you entered are a = 2.00 , b=3.00, c= 5.0

The solutions to the equation are:

x1 = -0.75 -1.39i x2 = -0.75 + 1.39i

This program will solve the equation: ax^2 + bx + c = 0Please enter three values for a, b, and c :365The values you entered are a = 3.00 , b=6.00, c= 5.0

The solutions to the equation are:

x1 = -1.00 -0.82i x2 = -1.00 + 0.82i

This program will solve the equation: ax^2 + bx + c = 0Please enter three values for a, b, and c :192The values you entered are a = 1.00 , b=9.00, c= 2.0

The solutions to the equation are:

x1 = -8.772002 x2 = -0.227998