Submission #00105
ソースコード
ステータス
項目 |
データ |
問題 |
0001 - int? |
ユーザー名 |
ei2331
|
投稿日時 |
2024-11-18 16:24:33 |
言語 |
C |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
86 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.c:1:1: warning: data definition has no type or storage class
c;main(){while(scanf("%c",&c)!=EOF){if(c==46){puts("float");return 0;}puts("int");}}
^
./Main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int]
./Main.c:1:3: warning: return type defaults to ‘int’ [-Wimplicit-int]
c;main(){while(scanf("%c",&c)!=EOF){if(c==46){puts("float");return 0;}puts("int");}}
^~~~
./Main.c: In function ‘main’:
./Main.c:1:16: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
c;main(){while(scanf("%c",&c)!=EOF){if(c==46){puts("float");return 0;}puts("int");}}
^~~~~
./Main.c:1:16: warning: incompatible implicit declaration of built-in function ‘scanf’
./Main.c:1:16: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+#include <stdio.h>
c;main(){while(scanf("%c",&c)!=EOF){if(c==46){puts("float");return 0;}puts("int");}}
^~~~~
./Main.c:1:32: error: ‘EOF’ undeclared (first use in this function)
c;main(){while(scanf("%c",&c)!=EOF){if(c==46){puts("float");return 0;}puts("int");}}
^~~
./Main.c:1:32: note: ‘EOF’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
./Main.c:1:32: note: each undeclared identifier is reported only once for each function it appears in
./Main.c:1:47: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
c;main(){while(scanf("%c",&c)!=EOF){if(c==46){puts("float");return 0;}puts("int");}}
^~~~
セット
テストケース