Skip to content

Instantly share code, notes, and snippets.

@raryosu
Created June 25, 2015 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raryosu/9aff910ac9131ac8eb90 to your computer and use it in GitHub Desktop.
Save raryosu/9aff910ac9131ac8eb90 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main() {
int n, a[100], count;
// 1行目(数列の長さ)の読み込み
scanf("%d", &n);
// 2行目(数列の値)の読み込み
for(count=0; count<n; count++) {
scanf("%d", &a[count]);
}
// 値の出力
for(count=n; count>0; count--) {
printf("%d", a[count-1]);
// 最後でなければ空白を表示
if(count!=1) {
printf(" ");
} else {
printf("\n");
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment