I'm working on a basic stack calculator. Input for pushin a number onto a stack is PUSH 5, PUSH 78 etc. I've been using fgets to get input from stdin, so does anyone have any ideas how to check for the numeric input using fgets? My idea was to remove the spaces in between and check if the next char is a number or not, but I'm not sure how to go about doing it.
Any ideas?