QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#416730#1265. Total EclipseZhangYiDeCompile Error//C89330b2024-05-22 04:24:522024-05-22 04:24:53

Details

answer.code: In function ‘main’:
answer.code:7:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
    7 |     for(int i=1;i<=n;i++)
      |     ^~~
answer.code:7:5: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code
answer.code:12:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   12 |         for(int j=i+1;j<=n;j++)
      |         ^~~
answer.code:17:13: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   17 |             for(int k=j+1;k<=n;k++)
      |             ^~~
answer.code:5:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    5 |     scanf("%d",&n);
      |     ^~~~~~~~~~~~~~