HW6.28

时间:2023-12-16 14:19:38

HW6.28

 import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);
         int[] number = new int[10];
         System.out.print("Enter 10 numbers: ");
         for(int i = 0; i < 10; i++)
             number[i] = input.nextInt();

         input.close();

         for(int i = 0; i < 9; i++)
         {
             for(int j = i + 1; j < 10; j++)
                 System.out.println(number[i] + " " + number[j]);
         }
     }
 }

相关文章