Skip to content

Commit 976ab8a

Browse files
authored
Update stack.c
Removed the last else-block from the "if (c == '-')" to prevent second digit from being skipped in the parsing process.
1 parent 8229054 commit 976ab8a

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

chapter_4/exercise_4_04/stack.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,6 @@ int getop(char s[])
215215
s[++i] = c = next;
216216
}
217217
}
218-
// else
219-
// {
220-
// c = getch();
221-
// }
222-
// This else block caused '33 44+' to output 7 instead of 77
223218

224219
if (isdigit(c))
225220
{

0 commit comments

Comments
 (0)