为什么在vc++6.0可以得到正确答案,在code blocks中却不能得到???急急急

2025-04-06 19:57:55
推荐回答(1个)
回答1:

#include 
const int i=10;
using namespace std;
int main()
{
int a[i],m,max;
cout<<"enter a lot of number:\n";
cin>>a[0];//先输入a[0]再赋值,不然会是随机值
max=a[0];
for(m=1;m {
cin>>a[i];
if(a[i]>max)
max=a[i];
}
cout<<"the max of a lot of number is:"< return 0; //return写错了
}