日期:2014-05-20 浏览次数:20750 次
import java.util.Scanner; public class Test41 { public static void main(String[] args) { System.out.println("请输入10个整数:"); Scanner scanner = new Scanner(System.in); int[] arr = new int[10]; for(int i=0; i<10; i++){ arr[i] = scanner.nextInt(); } for(int i=0; i<5; i++){ System.out.println(arr[i] + ", " + arr[9-i]); } } }