📄 getop.c
字号:
#include <stdio.h>#include <ctype.h>#include "getop.h"#include "getch.h"/* getop: get next operator or numeric operand *//* note simplification allowed for ints--no decimal point handling */int getop(char s[]){ int i=0, c; while ((s[0] = c = getch()) == ' ' || c == '\t') ; s[1] = '\0'; if (!isdigit(c)) return c; /* not a number */ else while (isdigit(s[++i] = c = getch())) ; s[i] = '\0'; if (c != EOF) ungetch(c); return NUMBER;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -