-
-
Save john01dav/3f45904bd3b26bae99da to your computer and use it in GitHub Desktop.
main.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include "term.h" | |
using std::cout; | |
using std::endl; | |
using std::cin; | |
using std::vector; | |
using std::string; | |
int main(){ | |
string equationString; | |
vector<Term> equation; | |
cout << "Enter an equation: " << endl; | |
cin >> equationString; | |
equation = parseEquation(equationString); | |
cout << endl; | |
printEquation(equation); | |
cout << endl; | |
while(equation.size() > 1){ | |
simplifyEquation(equation); | |
printEquation(equation); | |
cout << endl; | |
} | |
cout << endl << "Final Answer: "; | |
printEquation(equation); | |
cout << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment