Submission #16355

#TimeUsernameProblemLanguageResultExecution timeMemory
16355eaststarscanf 함수 5 (BSC_0_7)C11
Compilation error
0 ms0 KiB
main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}

Compilation message (stderr)

scanf5.c:1:1: warning: return type defaults to ‘int’ [-Wreturn-type]
 main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}
 ^
scanf5.c: In function ‘main’:
scanf5.c:1:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
scanf5.c:1:16: warning: incompatible implicit declaration of built-in function ‘scanf’
 main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}
                ^
scanf5.c:1:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
 main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}
 ^
scanf5.c:1:36: warning: incompatible implicit declaration of built-in function ‘printf’
 main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}
                                    ^
scanf5.c:1:48: error: expected expression before ‘double’
 main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}
                                                ^
scanf5.c:1:48: warning: control reaches end of non-void function [-Wreturn-type]
 main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}
                                                ^