diff --git a/dynacalc1.0.cpp b/dynacalc1.0.cpp index 1fe8226..597a02c 100644 --- a/dynacalc1.0.cpp +++ b/dynacalc1.0.cpp @@ -2,7 +2,7 @@ #include using namespace std; - +void newCalc(); float num1, num2, result; string userInput; @@ -36,13 +36,25 @@ int main() if(userInput!= "+" && userInput!= "-" && userInput!= "*" && userInput!= "/") { - cerr << "invalid input"; + cerr << "invalid input" <> newOption; + if(newOption == 'y' || newOption == 'Y') + main(); + else + return; +}