Algebra calculator.cpp

# Algebra calculator.cpp - #include #include...

• Homework Help
• 2

This preview shows page 1 - 2 out of 2 pages.

#include <iostream> #include <cmath> using namespace std; double slope(double x1,double y1, double x2, double y2 ) //Mod.. { return (y2-y1)/(x2-x1); //Formula to get slope } double quadratic(double a,double b, double c, double x1, double x2) { x1=(-b) + sqrt( pow(b,2)-(4*a*c /2*a)); x2=(+b) + sqrt( pow(b,2)-(4*a*c /2*a)); if(pow(b,2) - 4*a*c < 0); cout<<"undefined"<<endl; return x1 && x2; } double distance (double x1, double y1, double x2, double y2) { return sqrt(pow( (x2-x1),2) + pow((y2-y1),2)); } double midPoint (double x1, double y1, double x2, double y2,double x, double y) { x=((x2+x1)/2); y=((y2+y1)/2); return x && y ; }; int main() { char ask='p'; int choice; double x1,x2,y1,y2,a,b,c,x,y; do { cout<<" 1 -- Find the slope "<<endl; cout<<" 2 -- Find the intercepts "<<endl; cout<<" 3 -- Find Distance "<<endl; cout<<" 4 -- Find Mind Point "<<endl; //!!!!!Modify that way the programm will not exit!!!!!! cout<<" 5 -- Exit "<<endl; cout<<"Pick one

Subscribe to view the full document.

• Spring '15
• Guillermo Flores

{[ snackBarMessage ]}

###### "Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern