📄 krx41100.c
字号:
#include <stdio.h>
#define NUMBER '0'
int getop(char *s)
{
int c;
static int buf = EOF;
if (buf != EOF && buf != ' ' && buf != '\t'
&& !isdigit(buf) && buf != '.') {
c = buf;
buf = EOF;
return c;
}
if (buf == EOF || buf == ' ' || buf == '\t')
while ((*s = c = getch()) == ' ' || c == '\t')
;
else
*s = c = buf;
buf = EOF;
*(s + 1) = '\0';
if (!isdigit(c) && c != '.')
return c; /* not a number */
if (isdigit(c)) /* collect integer part */
while (isdigit(*++s = c = getch()))
;
if (c == '.') /* collect fraction part */
while (isdigit(*++s = c = getch()))
;
*++s = '\0';
buf = c;
return NUMBER;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -