Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72115 LJY 求最大值 C++ Compile Error 0 MS 0 KB 293 2024-05-01 09:11:52

Tests(0/0):


Code:

#include <stdio.h> int main() { int num[10],i,max; for(i=0;i<10;i++) scanf("%d",&num[i]); max=num[0]; for(int j=0;j<10;j++) { if(num[j]>max) max=num[j]; } printf("%d\n",max); return 0;


Run Info:

Main.cc: In function 'int main()':
Main.cc:16:14: error: expected '}' at end of input
      return 0;
              ^
Main.cc:8:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
           scanf("%d",&num[i]);
                              ^