From 0b7f2f763dcd8df6ea324b2eb0839101adda836a Mon Sep 17 00:00:00 2001 From: KosuGuti Date: Mon, 22 Oct 2018 23:37:47 +0530 Subject: [PATCH] Added new calculation feature --- dynacalc1.0.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) 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; +}