1, the last item is divided by the previous one, so there are at most 9 times. If you divide by the tenth time, you will get a [10], which overflows. ...
2.2. The usage of for is wrong. You can have multiple conditions, but that's not what it says. The first semicolon assigns a definition and intermediate judgment conditions. Obviously, your mistake, double control should be like this.
for (int j =0,I = 0; J<9&me< 10; I++, j++) but not here.
3.% is to take the remainder, not the quotient, and use it directly? /? Do it,
4. Don't need printf output parameters? & amp? The output is an address, not a value.
Reference code:
int a[ 10],b[9];
Printf ("Enter number: \ n");
for(int I = 0; I & 10; i++)
{
Printf ("Enter %d digits:", I+1);
scanf("%d ",& ampampa[I]);
}
Printf ("The result is as follows: \ n");
for(int j = 0; Johnson & Johnson company lt; 9; j++)
{
b[j]= a[j+ 1]/a[j];
printf("%d\t ",b[j]);
If (j% 3==2)
{
printf(" \ n ");
}
}