diff --git a/src/operationHandler.c b/src/operationHandler.c index 616b627..519fc31 100644 --- a/src/operationHandler.c +++ b/src/operationHandler.c @@ -4,6 +4,7 @@ #include #include +// checking integer input as operation id bool checkOperationInput(int input) { switch (input) { case 4: case 3: case 2: case 1: @@ -12,9 +13,12 @@ bool checkOperationInput(int input) { return false; } +// full input process int* evaluateInput(char* input, int operation) { + // check if formatting is correct if(!containsTwoNumbers(input)) return NULL; int firstNumber = extractFirstNumber(input); + // origin string "input" has been edited int secondNumber = atoi(input); int* result = malloc(sizeof(int)); switch (operation) {