首页 > 代码库 > HW6.28

HW6.28

技术分享

 

 1 import java.util.Scanner; 2  3 public class Solution 4 { 5     public static void main(String[] args) 6     { 7         Scanner input = new Scanner(System.in); 8         int[] number = new int[10]; 9         System.out.print("Enter 10 numbers: ");10         for(int i = 0; i < 10; i++)11             number[i] = input.nextInt();12 13         input.close();14 15         for(int i = 0; i < 9; i++)16         {17             for(int j = i + 1; j < 10; j++)18                 System.out.println(number[i] + " " + number[j]);19         }20     }21 }

 

HW6.28