Time:02-06
Int main () {Int ch=0; While ((ch=getchar ())!=(EOF) {If (ch & lt; '0' | | ch> '9') continue; Putchar (ch); } return 0; }
CodePudding user response:
Int main () {Int ch=0; While ((ch=getchar ())!=(EOF) {If (ch & lt; '0' | | ch> '9') continue; Putchar (ch); } return 0; } Bigwigs doubt dispels doubts, why is this code 0 or 9 can be 0 or 9
Quote: refer to the original poster unclekingfish response: Int main () {Int ch=0; While ((ch=getchar ())!=(EOF) {If (ch & lt; '0' | | ch> '9') continue; Putchar (ch); } return 0; } Bigwigs doubt dispels doubts, why is this code 0 or 9 can be 0 or 9 If statement inside the parentheses wrong Should be the if (ch>='0' | | ch<='9')
Page link:https//www.codepudding.com/Backend/101056.html