#include void main(){float b[6]={1.1,2.2,3.3,4.4,5.5,6.6},t;int i;t=b[0];for(i=0;i<5;i++)b[i]=b[i+1];b[5]=t;for(i=0;i<6;i++)printf(“%6.2f”,b[i]);}运行结果[填空1]
#include void main(){ int p[7]={11,13,14,15,16,17,18};int i=0,k=0;while(i<7 && p[i]%2){ k=k+p[i];i++;}printf("k=%d\n",k);}运行结果:[填空1]
void main(){ int a[3][3]={1,3,5,7,9,11,13,15,17};int sum=0,i,j;for (i=0;i<3;i++)for (j=0;j<3;j++){ a[i][j]=i+j;if (i==j)sum=sum+a[i][j];}printf("sum=%d\n",sum);}运行结果: [填空1]
void main(){ int a[4][4],i,j,k;for (i=0;i<4;i++)for (j=0;j<4;j++)a[i][j]=i-j;for (i=0;i<4;i++){ for (j=0;j<=i;j++)printf("%4d",a[i][j]);printf("\n");}}运行结果[填空1][填空2][填空3][填空4]