Created
June 25, 2015 11:44
-
-
Save raryosu/9aff910ac9131ac8eb90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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