#include
int main()
{
int a[10] = {1,2,3,4,5,6,7,8,9,10};
int b[9];
int i;
for ( i = 0; i < 9; i++)
{
b[i] = a[i+1] - a[i];
if (0 == i % 3)
{
printf("\n");
}
printf("%d",b[i]);
}
printf("\n");
return 0;
}
#include
#define N 10
int main(void)
{
int a[N]={4,2,7,3,8,6,7,20,9,17},b[N-1],i,j,k=0;
for(i=1;i
b[i]=a[i+1]-a[i];
}
for(j=1;j{
printf("%4d",b[j]);
k++;
if(k%3==0)
{
printf("\n");
}
}
return(0);
}
#include
#define n 10
void main()
{
int a[n],b[n-1],i,j,k=0;
printf ("输入10个数:\n");
for (i=0;i
printf ("a[%d]= ",i);
scanf ("%d",&a[i]);
}
for(i=0,j=0;i
b[j]=a[i+1]-a[i];
}
for(j=0;j
printf("%5d",b[j]);
k++;
if(k%3==0)
{
printf("\n");
}
}
}