C语言变量逆序输出操作案例

#include
int main()
{
	int i, a[10];
	for (i = 0; i <= 9; i++)
		a[i] = i;
	for (i = 9; i >= 0; i--)
		printf("%d ", a[i]);
	printf("\n");
	return 0; //This code first assigns a value to one variable and 
	          // then outputs the 10 variables in reverse order
} 

你可能感兴趣的:(c语言,c++,算法)