1-6-04: Inverse Array Replay

Source: Internet
Author: User

Describe
re-stores the values in an array in reverse order. For example, the original order is 8,6,5,4,1. Request changed to 1,4,5,6,8.
Input
The
input is two lines: the number of elements in the first row array n (1<n<100), the second row is n integers, and each two integers is separated by a space.
Output
output is a single line: The integer of the array is output in reverse order, separated by a space between each two integers.
Sample input
58 6 5) 4 1
Sample output
1 4 5) 6 8
1#include <stdio.h>2 intMain ()3 {4     inta[101]={0};5     intN;6scanf"%d",&n);7      for(intI=1; i<=n;i++)8scanf"%d",&a[i]);9      for(inti=n;i>=1; i--)Tenprintf"%d", A[i]); Oneprintf"\ n"); A     return 0; -}

1-6-04: Inverse Array Replay

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.