2024/07/09
题目:
![图片[1]-JAVA——拆分位数 - 拾光赋-拾光赋](https:https://image.baidu.com/search/down?url=https://img2024.cnblogs.com/blog/2709094/202407/2709094-20240709092906161-1598274024.png)
解题:
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("您输入的不是三位数");
}
}
}
© 版权声明
THE END


![表情[baoquan]-拾光赋](https://blogs.ink/wp-content/themes/zibll/img/smilies/baoquan.gif)


暂无评论内容