Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5694 邓小龙 13求7个数的最大值 C++ Compile Error 0 MS 0 KB 287 2024-12-14 09:31:16

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl using namespace std; int main(){ int _max=INT_MIN;//INT_MAX,INT_MIN int temp; for(int i=1;i<=7;i++){ cin>>temp; if(temp>_max) swap(temp,_max);//交换temp和_max的值 } cout<<_max<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:14: error: 'INT_MIN' was not declared in this scope
     int _max=INT_MIN;//INT_MAX,INT_MIN
              ^