其余部分先不管,问题就在输入——
我的输入部分代码如下:
do{ int x; cin>>x; a[n]=x; n++; }while(cin.get()!=EOF); n--;
如果不删掉n--部分就是#4和#7没过,其他都过了;如果删掉n--部分就是#4和#7过了,其他都没过。
表示疑惑?