From 976ab8a0112c5b31b30f9dbdf0b5451c4ac896d4 Mon Sep 17 00:00:00 2001 From: sadeem_albir <142955101+sadeem-albir@users.noreply.github.com> Date: Tue, 27 Feb 2024 19:23:14 +0300 Subject: [PATCH] Update stack.c Removed the last else-block from the "if (c == '-')" to prevent second digit from being skipped in the parsing process. --- chapter_4/exercise_4_04/stack.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/chapter_4/exercise_4_04/stack.c b/chapter_4/exercise_4_04/stack.c index 59cfd9b..9c4c1c8 100644 --- a/chapter_4/exercise_4_04/stack.c +++ b/chapter_4/exercise_4_04/stack.c @@ -215,11 +215,6 @@ int getop(char s[]) s[++i] = c = next; } } -// else -// { -// c = getch(); -// } -// This else block caused '33 44+' to output 7 instead of 77 if (isdigit(c)) {