Problem2543--输入n个数字并逆序输出练习2

2543: 输入n个数字并逆序输出练习2

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 141  Solved: 123
[Status] [Submit] [Creator:]

Description

输入n个数字,将这n个数字逆序输出,每两个数之间用一个空格隔开。
要求使用另一个数组逆序存放


将下列代码补充完整,使其能够通过此题
#include<bits/stdc++.h>
using namespace std;
int a[10005],b[10005];
int main()
{
    int n;
    cin>>n;
    for(int i=1; i<=n; i++)
    {
        cin>>a[i];
    }
    for(int i=1; i<=n; i++)
    {
        _______;
    }
    for(int i=1; i<=n; i++)
    {
        cout<<b[i]<<" ";
    }
return 0;
}

Input

输入为两行。
第一行为n,表示整数序列的长度(n<=100)。
第二行为n个正整数,每两个数之间用一个空格隔开。

Output

仅一行,为输入数字的倒序输出,每两个数之间用一个空格隔开。

Sample Input Copy

13
1 2 3 4 5 6 7 8 9 0 3 5 6

Sample Output Copy

6 5 3 0 9 8 7 6 5 4 3 2 1

HINT


Source/Category

入门