本帖最後由 柏霖 於 2024-1-6 14:03 編輯
- import java.util.Scanner;
- public class JP101 {
- public static void main(String[] args)
- {
- Scanner sc=new Scanner(System.in);
- int a=sc.nextInt();
- int b=sc.nextInt();
- int c=sc.nextInt();
- int d=sc.nextInt();
- int e=sc.nextInt();
- int f=sc.nextInt();
- System.out.printf("%10d %10d %10d\n%10d %10d %10d\n",a,b,c,d,e,f);
- System.out.printf("%-10d %-10d %-10d\n%-10d %-10d %-10d",a,b,c,d,e,f);
- }
- }
複製代碼 |