题解 | #逆序输出#
逆序输出
https://www.nowcoder.com/practice/bb66c27cb7aa48f9ba7d9f88e4068285
#include <stdio.h> int main() { int a[10],i = 9; while (~scanf("%d", &a[i--])); for (i = 0; i < 10; i++) { printf("%d ", a[i]); } return 0; }
逆序输出
https://www.nowcoder.com/practice/bb66c27cb7aa48f9ba7d9f88e4068285
#include <stdio.h> int main() { int a[10],i = 9; while (~scanf("%d", &a[i--])); for (i = 0; i < 10; i++) { printf("%d ", a[i]); } return 0; }
相关推荐