这样都不报错!!!太牛了!
#include <iostream>using namespace std;
int main()
{
int num[5];
int sum=0;
for(int i=0;i<5;i++)
{
cout<<"Enter element "<<i<<":";
cin>>i[num];
}
for(int j=0;j<5;j++)
sum=sum+j[num];
cout<<"The resulting sum is :"<<sum<<endl;
return 0;
}
红色带下划线字体太牛了,编译时居然没报它错!!!请大家帮忙解释一下呗!!!谢谢啦!!