作业帮 > 综合 > 作业

java编写程序输入3个整数排序.并按从小到大输出

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/05/03 10:08:28
java编写程序输入3个整数排序.并按从小到大输出
public void scanner() {
\x09\x09int arr[] = new int[5]; //存储输入数据
\x09\x09int temp;\x09\x09\x09\x09//用于数据交换
\x09 System.out.println("Please input five integers:");
\x09 Scanner scan = new Scanner(System.in);//接收输入数据
\x09 for (int i=0; i