I was so bored this weekend that I watched not 1, not 2, but all 3 of the movies in the Back to the Future Trilogy, plus some bonus material!!! Someone help me!!!
i'm rocking the suburbs, just like quiet riot did...
Rusty888 wrote:I was so bored this weekend that I watched not 1, not 2, but all 3 of the movies in the Back to the Future Trilogy, plus some bonus material!!! Someone help me!!!
I would of watched it too, I have it on DVD, however I think I would of gone with the classic Star Wars trilogy(on DVD) starting with A New Hope...
//############################################# //CSCI 240 Assignment 5 - Spring 2006 //Programmer: Jason Z107419 //Section: 10 //GA: //Date Due: 2/24/2006 //Purpose: This program is designed to // prompt the user for for a // quadratic equation and detrermin // the discrimant, vertex, whether // it opens up or down, and the // roots. //##############################################
double getA(double x) { cout << "Please enter A coeffiecient: "; cin >> x;
while (x==0) { cout << "Please enter a non-zero number" << endl;
cout << "Please enter A coeffiecient: "; cin >> x; } return x; } //***************************
double getDiscr(double a, double b, double c) { return (b*b)-(4*a*c); }
//***************************
double getVertex_X(double a, double b) { return (-b)/(2*a); }
//***************************
double getVertex_Y(double a, double b, double c) { return a * pow(-b/(2*a),2)+b*(-b/(2*a))+c; }
//***************************
double getRoot1(double a, double b, double c) { return (-b-sqrt(pow(b,2)-4*a*c))/(2*a); }
//***************************
double getRoot2(double a, double b, double c) { return (-b - sqrt(pow(b,2)-4*a*c))/(2*a); }
//***************************
char getYesNo(string s) { cout << "Another (y/n)?:"; cin >> s; if (s == "y" || s == "Y" || s == "Yes" || s == "YES" || s== "yes") return 'y'; else if (s == "n" || s == "N" || s == "NO" || s == "No" || s== "no") return 'n'; while (s != "y" || s != "y" || s != "Yes" || s != "YES"|| s != "yes"|| s != "n" || s != "N" || s != "No" || s != "NO" || s != "no") { cout << endl << "Please Enter another Value: "; cin >> s; if (s == "y" || s == "Y" || s == "Yes" || s == "YES" || s== "yes") { return 'y'; } else if (s == "n" || s == "N" || s == "NO" || s == "No" || s== "no") { return 'n'; } } }
//***************************
int main () { string S; do { double A, B, C, Discr, Xver, Yver, Root1, Root2; string S;
A = getA(A);
cout << "Please enter B coeffiecient: "; cin >> B;
cout << "Please enter C coeffiecient: "; cin >> C;
if (A>0) { cout << "The Parabola opens upward" << endl; } else { cout << "The Parabola opens down" << endl; }
Discr = getDiscr(A, B, C); cout << "The Discriminant is: " << Discr << fixed << setprecision (3) << endl;
Xver = getVertex_X(A, B); Yver = getVertex_Y(A, B, C); cout << "The Vertex has the coordinates of x = " << Xver << fixed << setprecision (3) << " y = " << fixed << setprecision (3) << Yver << endl;
if (Discr == 0) { Root1 = getRoot1(A, B, C); cout << "The Quadratic Equation has only 1 root: " << Root1 << fixed << setprecision (3) << endl; } else if (Discr < 0) { cout << "There are no roots for this Quadratic Equation " << endl; } else { cout << "The Parabola has 2 roots at: " << endl; Root1 = getRoot1(A, B, C); cout << "Root 1 is: " << Root1 << fixed << setprecision (3) << endl;