不用调试,妮知道答案嘛?
#include <iostream>
using namespace std;
const int SIZE = 6;
int main(void)
{
cout<<"yi da duan fei hua:";
float temp;
int i=1,array[SIZE];
cin>>temp;
while( i <= 6 && temp >= 0)
{
array[i]=temp;
cout<<"a["<< i++ <<"]="<<temp<<endl;
cin>>temp;
}
return 0;
}