scanf12.c

来自「绝对正真的stdio.h的实现」· C语言 代码 · 共 24 行

C
24
字号
#include <stdio.h>#include <stdlib.h>intmain (void){  double d;  int c;  if (scanf ("%lg", &d) != 0)    {      printf ("scanf didn't failed\n");      exit (1);    }  c = getchar ();  if (c != ' ')    {      printf ("c is `%c', not ` '\n", c);      exit (1);    }  return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?