From afb308b8b68842567ae95c8e1368a3b69494f754 Mon Sep 17 00:00:00 2001 From: yang-fenghao <3440490984@qq.com> Date: Tue, 5 Jan 2021 20:23:51 +0800 Subject: [PATCH] first commit --- .../\344\272\244\346\215\242.java" | 63 +++++++++++++++++++ .../\345\271\202.java" | 32 ++++++++++ .../\347\253\213\346\226\271.java" | 22 +++++++ .../\351\232\217\346\234\272.java" | 26 ++++++++ 4 files changed, 143 insertions(+) create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\235\250\344\270\260\350\261\252/\344\272\244\346\215\242.java" create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\235\250\344\270\260\350\261\252/\345\271\202.java" create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\235\250\344\270\260\350\261\252/\347\253\213\346\226\271.java" create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\235\250\344\270\260\350\261\252/\351\232\217\346\234\272.java" diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\235\250\344\270\260\350\261\252/\344\272\244\346\215\242.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\235\250\344\270\260\350\261\252/\344\272\244\346\215\242.java" new file mode 100644 index 0000000..f3aaf7c --- /dev/null +++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\235\250\344\270\260\350\261\252/\344\272\244\346\215\242.java" @@ -0,0 +1,63 @@ +package 东东东; + +import java.util.Scanner; + +public class 交换 { + + public static void main(String[] args) { + // TODO Auto-generated method stub + int[] nums = new int[10]; + Scanner scanner = new Scanner(System.in); + for (int i = 0; i < 10; i++) { + System.out.println("请输入数字:"); + nums[i] = scanner.nextInt(); + } + int max = nums[0]; + int min = nums[0]; + + for (int i = 0; i < nums.length; i++) { + if (max < nums[i]) { + max = nums[i]; + } + if (max > nums[i]) { + max = nums[i]; + }} + System.out.println("change之前"); +for(int i=0;i