Home > Back-end >  A beginner, the teacher the assignment, but the teacher didn't speak, for advice
A beginner, the teacher the assignment, but the teacher didn't speak, for advice

Time:12-09

Used to a loop statement assignment 1 hc-positie each element array, then reverse the output

CodePudding user response:

#include

Int main ()
{
int i=0;
Int a, [4].
for(i=0; i<4. I++)
{
A [I]=I * 2 + 1;
}
//the output reverse
For (I=3; I>=0; I -)
{
printf("%d ",a[i]);
}

}

CodePudding user response:

The
reference 1/f, Simple, Soft reply:
# include & lt; Stdio. H>

Int main ()
{
int i=0;
Int a, [4].
for(i=0; i<4. I++)
{
A [I]=I * 2 + 1;
}
//the output reverse
For (I=3; I>=0; I -)
{
printf("%d ",a[i]);
}

}

Thank the bosses

CodePudding user response:

Assignment, the subscript variable (I) from 0 to 3, the output of upside down, the subscript variable I from 3 to 0,
  • Related