come on·············
come on·············
#include<iostream.h> int x[]={5,4,3,2,1}; int main( ) { int i,*p,m=0; for(p=x,i=1;p+i<x+4;i++) { cout<<*(p+i); for(i=0;i<4;i++) { m+=p[i]; cout<<" \t "<<m; } } return 0; } 输出系:4 5 9 12 14 点解吾系 4 5 9 12 14 3 5 9 12 14 2 5 9 12 14 1 5 9 12 14 大循环净系循环1次??吾系4次咩?? |