Question: Please edit MY code, to implement the ^ to be able to calculate squares. My code right now can only add and subtract, and is

Write an even better calculator program calc3.cpp that can understand squared numbers. We are going to use a simplified notation X^ to mean X?. For example, 10^ + 7 - 51" should mean 102 + 7 - 512 Example: When reading input file formulas.txt 5; 1000 + 6" - 5+ 1; the program should report: $ ./calc3 using namespace std; int main() { int s, sum=0; cin>>sum; char op; while(cin>>op>>s) { if(op == ';'){ cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
