2024/07/09
題目:
解題:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("請輸入一個三位數:");
int a = scanner.nextInt();
if(a>99&&a<1000)
{
System.out.println(a%10+" "+a/10%10+" "+a/100%10);
}
else
{
System.out.println("您輸入的不是三位數");
}
}
}