From 5502ca580c6900aa9ffb8197e43c8ad2fdd4dcc2 Mon Sep 17 00:00:00 2001
From: syx6666 <1551324662@qq.com>
Date: Tue, 5 Jan 2021 23:11:46 +0800
Subject: [PATCH] first commit
---
.../Demo1.java" | 47 +++++++++++++++++++
.../Demo2.java" | 32 +++++++++++++
.../Demo3.java" | 25 ++++++++++
.../Demo1.java" | 47 +++++++++++++++++++
.../Demo2.java" | 32 +++++++++++++
.../Demo3.java" | 25 ++++++++++
.../\346\236\227\345\263\260/Demo1.java" | 47 +++++++++++++++++++
.../\346\236\227\345\263\260/Demo2.java" | 32 +++++++++++++
.../\346\236\227\345\263\260/Demo3.java" | 25 ++++++++++
9 files changed, 312 insertions(+)
create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo1.java"
create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo2.java"
create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo3.java"
create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo1.java"
create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo2.java"
create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo3.java"
create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo1.java"
create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo2.java"
create mode 100644 "java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo3.java"
diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo1.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo1.java"
new file mode 100644
index 0000000..4ad4eeb
--- /dev/null
+++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo1.java"
@@ -0,0 +1,47 @@
+package kkkkk;
+
+import java.util.Random;
+
+public class Demo1 {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Random random =new Random();
+ int a[]=new int[10];
+ System.out.println("¸Ä±äǰ");
+ for (int i = 0; i < 10; i++) {
+ a[i]=random.nextInt(100)+1;
+ System.out.print(a[i]+"\t");
+ }
+ int max=a[0];
+ int min=a[0];
+ for (int i = 1; i < 10; i++) {
+ if (maxa[i]) {
+ min=a[i];
+ }
+ }
+ System.out.println();
+ num(max,min,a);
+}
+
+ public static void num(int max, int min,int[]a) {
+ int d;
+ d=a[0];
+ a[0]=max;
+ max=d;
+ int g;
+ g=a[9];
+ a[9]=min;
+ min=g;
+ System.out.println("¸Ä±äºó");
+ for (int i = 0; i < 10; i++) {
+ System.out.print(a[i]+"\t");
+ }
+ }
+
+}
diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo2.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo2.java"
new file mode 100644
index 0000000..1e60142
--- /dev/null
+++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo2.java"
@@ -0,0 +1,32 @@
+package kkkkk;
+
+public class Demo2 {
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Scanner scanner =new Scanner(System.in);
+ Random random =new Random();
+ int a[]=new int[20];
+ for (int i = 0; i < 20; i++) {
+ a[i]=random.nextInt(10)+1;
+ }
+ System.out.println("请输入一个值ֵ");
+ int b=scanner.nextInt();
+ System.out.println("出现了"+num(b,a));
+
+ }
+
+ public static int num(int d,int[] a) {
+ int c;
+ int sum=0;
+ for (int i = 0; i < 20; i++) {
+ c=a[i];
+ System.out.print(c+"\t");
+ if (c==d) {
+ sum++;
+ }
+ }
+ System.out.println();
+ return sum;
+
+ }
+}
diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo3.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo3.java"
new file mode 100644
index 0000000..1a27ce1
--- /dev/null
+++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\224\220\345\207\241\350\276\211/Demo3.java"
@@ -0,0 +1,25 @@
+package kkkkk;
+
+public class Demo3 {
+ public class Wusasuhd {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Scanner scanner =new Scanner(System.in);
+ System.out.println("ÇëÊäÈënµÄÖµ");
+ int n=scanner.nextInt();
+ System.out.println("ÇëÔÙÊäÈëmµÄÖµ");
+ int m=scanner.nextInt();
+ System.out.println("×îÖÕ½á¹ûΪ£º"+num(n,m));
+
+ }
+
+ public static int num(int n, int m) {
+ int sum=1;
+ for (int i = 1; i <=n; i++) {
+ sum*=m;
+ }
+ return sum;
+ }
+}
+ }
diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo1.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo1.java"
new file mode 100644
index 0000000..4ad4eeb
--- /dev/null
+++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo1.java"
@@ -0,0 +1,47 @@
+package kkkkk;
+
+import java.util.Random;
+
+public class Demo1 {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Random random =new Random();
+ int a[]=new int[10];
+ System.out.println("¸Ä±äǰ");
+ for (int i = 0; i < 10; i++) {
+ a[i]=random.nextInt(100)+1;
+ System.out.print(a[i]+"\t");
+ }
+ int max=a[0];
+ int min=a[0];
+ for (int i = 1; i < 10; i++) {
+ if (maxa[i]) {
+ min=a[i];
+ }
+ }
+ System.out.println();
+ num(max,min,a);
+}
+
+ public static void num(int max, int min,int[]a) {
+ int d;
+ d=a[0];
+ a[0]=max;
+ max=d;
+ int g;
+ g=a[9];
+ a[9]=min;
+ min=g;
+ System.out.println("¸Ä±äºó");
+ for (int i = 0; i < 10; i++) {
+ System.out.print(a[i]+"\t");
+ }
+ }
+
+}
diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo2.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo2.java"
new file mode 100644
index 0000000..1e60142
--- /dev/null
+++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo2.java"
@@ -0,0 +1,32 @@
+package kkkkk;
+
+public class Demo2 {
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Scanner scanner =new Scanner(System.in);
+ Random random =new Random();
+ int a[]=new int[20];
+ for (int i = 0; i < 20; i++) {
+ a[i]=random.nextInt(10)+1;
+ }
+ System.out.println("请输入一个值ֵ");
+ int b=scanner.nextInt();
+ System.out.println("出现了"+num(b,a));
+
+ }
+
+ public static int num(int d,int[] a) {
+ int c;
+ int sum=0;
+ for (int i = 0; i < 20; i++) {
+ c=a[i];
+ System.out.print(c+"\t");
+ if (c==d) {
+ sum++;
+ }
+ }
+ System.out.println();
+ return sum;
+
+ }
+}
diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo3.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo3.java"
new file mode 100644
index 0000000..1a27ce1
--- /dev/null
+++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\345\225\206\350\265\242\346\227\255/Demo3.java"
@@ -0,0 +1,25 @@
+package kkkkk;
+
+public class Demo3 {
+ public class Wusasuhd {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Scanner scanner =new Scanner(System.in);
+ System.out.println("ÇëÊäÈënµÄÖµ");
+ int n=scanner.nextInt();
+ System.out.println("ÇëÔÙÊäÈëmµÄÖµ");
+ int m=scanner.nextInt();
+ System.out.println("×îÖÕ½á¹ûΪ£º"+num(n,m));
+
+ }
+
+ public static int num(int n, int m) {
+ int sum=1;
+ for (int i = 1; i <=n; i++) {
+ sum*=m;
+ }
+ return sum;
+ }
+}
+ }
diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo1.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo1.java"
new file mode 100644
index 0000000..4ad4eeb
--- /dev/null
+++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo1.java"
@@ -0,0 +1,47 @@
+package kkkkk;
+
+import java.util.Random;
+
+public class Demo1 {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Random random =new Random();
+ int a[]=new int[10];
+ System.out.println("¸Ä±äǰ");
+ for (int i = 0; i < 10; i++) {
+ a[i]=random.nextInt(100)+1;
+ System.out.print(a[i]+"\t");
+ }
+ int max=a[0];
+ int min=a[0];
+ for (int i = 1; i < 10; i++) {
+ if (maxa[i]) {
+ min=a[i];
+ }
+ }
+ System.out.println();
+ num(max,min,a);
+}
+
+ public static void num(int max, int min,int[]a) {
+ int d;
+ d=a[0];
+ a[0]=max;
+ max=d;
+ int g;
+ g=a[9];
+ a[9]=min;
+ min=g;
+ System.out.println("¸Ä±äºó");
+ for (int i = 0; i < 10; i++) {
+ System.out.print(a[i]+"\t");
+ }
+ }
+
+}
diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo2.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo2.java"
new file mode 100644
index 0000000..1e60142
--- /dev/null
+++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo2.java"
@@ -0,0 +1,32 @@
+package kkkkk;
+
+public class Demo2 {
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Scanner scanner =new Scanner(System.in);
+ Random random =new Random();
+ int a[]=new int[20];
+ for (int i = 0; i < 20; i++) {
+ a[i]=random.nextInt(10)+1;
+ }
+ System.out.println("请输入一个值ֵ");
+ int b=scanner.nextInt();
+ System.out.println("出现了"+num(b,a));
+
+ }
+
+ public static int num(int d,int[] a) {
+ int c;
+ int sum=0;
+ for (int i = 0; i < 20; i++) {
+ c=a[i];
+ System.out.print(c+"\t");
+ if (c==d) {
+ sum++;
+ }
+ }
+ System.out.println();
+ return sum;
+
+ }
+}
diff --git "a/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo3.java" "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo3.java"
new file mode 100644
index 0000000..1a27ce1
--- /dev/null
+++ "b/java\347\254\254\345\215\201\346\254\241\344\275\234\344\270\232/\346\236\227\345\263\260/Demo3.java"
@@ -0,0 +1,25 @@
+package kkkkk;
+
+public class Demo3 {
+ public class Wusasuhd {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Scanner scanner =new Scanner(System.in);
+ System.out.println("ÇëÊäÈënµÄÖµ");
+ int n=scanner.nextInt();
+ System.out.println("ÇëÔÙÊäÈëmµÄÖµ");
+ int m=scanner.nextInt();
+ System.out.println("×îÖÕ½á¹ûΪ£º"+num(n,m));
+
+ }
+
+ public static int num(int n, int m) {
+ int sum=1;
+ for (int i = 1; i <=n; i++) {
+ sum*=m;
+ }
+ return sum;
+ }
+}
+ }
--
Gitee