停止循环的输入
#include<stdio.h>#include<windows.h>
int main()
{
int a[100];
int x, n = 0;
while (scanf_s("%d", &x) == 1)
{
a[n++] = x;
}
for (int i = n - 1; i >= 0; i--)
{
printf_s("%d ", a[i]);
}
printf_s("\n");
system("pause");
return 0;
}
2019-02-06 09:38
2019-02-06 11:12
2019-02-06 11:49
2019-02-06 11:59
2019-02-07 13:32
2019-02-07 21:11