/* int float_int(char *) 関数 1)文字列なら:−1 2)整数なら:0 3)実数なら:1 を返す。 ※ Mac OSX/GCC */ #include <stdio.h> /* printf(), fgets() */ #include <string.h> /* strtok() */ #define SIZE 32 #define input(a,b) fprintf(stderr,a),fflush(stderr),*fgets(b,SIZE,stdin) int float_int(char *); /* プロトタイプ宣言 */ int main(void) { char buff[SIZE]; fprintf(stderr, "Loop end: Push [Enter] key only.\n"); while(input("? ", buff) !=
![C言語にて、入力値の型を判定する方法 - 度々お世話になります。現在、C言語にて、型判定のプログラムを作成中です。char... - Yahoo!知恵袋](https://cdn-ak-scissors.b.st-hatena.com/image/square/1d07bee2b75b182ba712690f3a3464c29972e28b/height=288;version=1;width=512/https%3A%2F%2Fs.yimg.jp%2Fimages%2Fks%2Fclap%2Fimage%2Fogp%2Fogp.png)