I need to getchar digits, but ignore spaces and dashes '-'
I'm thinking something like this:
Code:
if (one == '-' || one == ' ') {
(do not getchar)
} else {
one = getchar ();
}
What can I replace with (do not getchar) so that the program skips that character and goes and looks at the next character and in the meantime, starting at the if statement again rather than going on further.
Maybe a while statement? But I wouldn't know what to say such that it keeps repeating this loop until the program goes to the one = getchar (); line.
Note: I can't use breaks or go to