Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5773 刘芃伽 13求7个数的最大值 C++ Compile Error 0 MS 0 KB 276 2024-12-14 19:44:51

Tests(0/0):


Code:

#include<iostream> #include<limits>//INT_MTN INT_MAX using namespace std; int main() { int _max=INT_MIN,t;//int范围内最小的整数 for(int i=1;i<=7;i++){cin>>t;if(t>_max)_max=t;} cout<<_max*_max<<endl; cout<<_max*_max*_max<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:14: error: 'INT_MIN' was not declared in this scope
     int _max=INT_MIN,t;//int范围内最小的整数
              ^
Main.cc:7:32: error: 't' was not declared in this scope
     for(int i=1;i<=7;i++){cin>>t;if(t>_max)_max=t;}
                                ^