倒置输入的数 Exercise07_02

 1 import java.util.Scanner;
 2 /**
 3  * @author 冰樱梦
 4  * 时间:2018年下半年
 5  * 题目:倒置输入的数
 6  *
 7  */
 8 public class Exercise07_02 {
 9     public static void main(String[] args){
10         Scanner input=new Scanner(System.in);
11         int[] number=new int[10];
12         System.out.print("输入10个整数: ");
13         for(int i=0;i<10;i++){
14             number[i]=input.nextInt();
15         }
16         System.out.print("逆序输出为: ");
17         for(int j=9;j>=0;j--){
18             System.out.print(number[j]+" ");
19         }
20     }
21 }
原文地址:https://www.cnblogs.com/cherrydream/p/10173867.html