在PTA上做题,没有答案,查了一下只有用C++做的,而没有用C语言做的答案
#include <stdio.h>
int main()
{
int a[50];
int *p = a;
while (scanf("%d", p) == 1) // If input from console, type ctrl+d to end input
p++;
while (--p >= a)
printf("%d ", *p);
return 0;
}