Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5695 詹梓涵 13求7个数的最大值 C++ Compile Error 0 MS 0 KB 325 2024-12-14 09:33:23

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:11: error: 'INT_MIN' was not declared in this scope
     int m=INT_MIN;//最小//INT_MAX最大
           ^