답안 #1987

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1987 2013-07-19T14:20:41 Z gs13068_moi 최댓값 (tutorial2) C
컴파일 오류
0 ms 0 KB
GetMax(int N,int *A){for(int R=0;N--;R=R<A[N]?A[N]:R);return R;}

Compilation message

tutorial2.c:1:1: warning: return type defaults to 'int' [-Wreturn-type]
tutorial2.c: In function 'GetMax':
tutorial2.c:1:22: error: 'for' loop initial declarations are only allowed in C99 mode
tutorial2.c:1:22: note: use option -std=c99 or -std=gnu99 to compile your code