From 1ae47027f66c144bad16a2681ff7e9cf214a347e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Wed, 15 Feb 2023 02:12:51 +0000 Subject: [PATCH 01/10] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20homework?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homework/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 homework/.keep diff --git a/homework/.keep b/homework/.keep new file mode 100644 index 0000000..e69de29 -- Gitee From 511f5a80e11a3e7cbf541788e03289935fadbfa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Wed, 15 Feb 2023 02:13:09 +0000 Subject: [PATCH 02/10] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ho?= =?UTF-8?q?mework/.keep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homework/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 homework/.keep diff --git a/homework/.keep b/homework/.keep deleted file mode 100644 index e69de29..0000000 -- Gitee From 264a52f50d19f234a4ee7a812db63c8fceb05102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Wed, 15 Feb 2023 03:20:24 +0000 Subject: [PATCH 03/10] aa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 朱章彬 <1966813884@qq.com> --- .../\346\250\241\345\235\227/module.js" | 31 +++++++++++++++++++ .../\346\250\241\345\235\227/use.js" | 9 ++++++ 2 files changed, 40 insertions(+) create mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" create mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" new file mode 100644 index 0000000..1a5d833 --- /dev/null +++ "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" @@ -0,0 +1,31 @@ +function jia(a,b) { + if(a!=/^\d+$/ ||b!=/^\d+$/){ + return "请输入数字" ; + }else{ + return a+b; +}} + + +function jian(a,b) { + if(a!=/^\d+$/ ||b!=/^\d+$/){ + return "请输入数字" ; + }else{ + return a-b; +}} +function cheng(a,b) { + if(a!=/^\d+$/ ||b!=/^\d+$/){ + return "请输入数字" ; + }else{ + return a*b; +}} +function chu(a,b) { + if(a!=/^\d+$/ ||b!=/^\d+$/){ + return "请输入数字" ; + }else{ + return a/b; +}} + +module.exports.jia =jia; +module.exports.jian =jian; +module.exports.cheng =cheng; +module.exports.chu =chu; \ No newline at end of file diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" new file mode 100644 index 0000000..526c847 --- /dev/null +++ "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" @@ -0,0 +1,9 @@ +let result=require("./module"); +console.log(result); + + +console.log(result.jia("x",2)); +console.log(result.jia(2,2)); +console.log(result.jian(50,2)); +console.log(result.cheng(50,2)); +console.log(result.chu(50,2)); \ No newline at end of file -- Gitee From ae761b2f84d2867611c643b130835ce34b463a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Wed, 15 Feb 2023 03:21:37 +0000 Subject: [PATCH 04/10] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC/=E4=BD=9C=E4=B8=9A/=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\346\250\241\345\235\227/module.js" | 31 ------------------- .../\346\250\241\345\235\227/use.js" | 9 ------ 2 files changed, 40 deletions(-) delete mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" delete mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" deleted file mode 100644 index 1a5d833..0000000 --- "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" +++ /dev/null @@ -1,31 +0,0 @@ -function jia(a,b) { - if(a!=/^\d+$/ ||b!=/^\d+$/){ - return "请输入数字" ; - }else{ - return a+b; -}} - - -function jian(a,b) { - if(a!=/^\d+$/ ||b!=/^\d+$/){ - return "请输入数字" ; - }else{ - return a-b; -}} -function cheng(a,b) { - if(a!=/^\d+$/ ||b!=/^\d+$/){ - return "请输入数字" ; - }else{ - return a*b; -}} -function chu(a,b) { - if(a!=/^\d+$/ ||b!=/^\d+$/){ - return "请输入数字" ; - }else{ - return a/b; -}} - -module.exports.jia =jia; -module.exports.jian =jian; -module.exports.cheng =cheng; -module.exports.chu =chu; \ No newline at end of file diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" deleted file mode 100644 index 526c847..0000000 --- "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" +++ /dev/null @@ -1,9 +0,0 @@ -let result=require("./module"); -console.log(result); - - -console.log(result.jia("x",2)); -console.log(result.jia(2,2)); -console.log(result.jian(50,2)); -console.log(result.cheng(50,2)); -console.log(result.chu(50,2)); \ No newline at end of file -- Gitee From f7d560e6cab42e454b865e9261a3bd57be16350d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Wed, 15 Feb 2023 03:23:12 +0000 Subject: [PATCH 05/10] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E6=9C=B1=E7=AB=A0?= =?UTF-8?q?=E5=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\234\261\347\253\240\345\275\254/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\346\234\261\347\253\240\345\275\254/.keep" diff --git "a/\346\234\261\347\253\240\345\275\254/.keep" "b/\346\234\261\347\253\240\345\275\254/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From d3bf0b3bbb4469c74e8f33e9f22040da5546c30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Wed, 15 Feb 2023 03:24:40 +0000 Subject: [PATCH 06/10] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\344\275\234\344\270\232/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/.keep" diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/.keep" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 342105d1ba5595558450c5b63483657e4c7e81f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Wed, 15 Feb 2023 03:25:09 +0000 Subject: [PATCH 07/10] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\344\275\234\344\270\232/\346\250\241\345\235\227/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/.keep" diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/.keep" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From cb966fbfb535e49c546ef421bbf117d6ee78830a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Wed, 15 Feb 2023 03:26:04 +0000 Subject: [PATCH 08/10] aa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 朱章彬 <1966813884@qq.com> --- .../\346\250\241\345\235\227/module.js" | 31 +++++++++++++++++++ .../\346\250\241\345\235\227/use.js" | 9 ++++++ 2 files changed, 40 insertions(+) create mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" create mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" new file mode 100644 index 0000000..1a5d833 --- /dev/null +++ "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" @@ -0,0 +1,31 @@ +function jia(a,b) { + if(a!=/^\d+$/ ||b!=/^\d+$/){ + return "请输入数字" ; + }else{ + return a+b; +}} + + +function jian(a,b) { + if(a!=/^\d+$/ ||b!=/^\d+$/){ + return "请输入数字" ; + }else{ + return a-b; +}} +function cheng(a,b) { + if(a!=/^\d+$/ ||b!=/^\d+$/){ + return "请输入数字" ; + }else{ + return a*b; +}} +function chu(a,b) { + if(a!=/^\d+$/ ||b!=/^\d+$/){ + return "请输入数字" ; + }else{ + return a/b; +}} + +module.exports.jia =jia; +module.exports.jian =jian; +module.exports.cheng =cheng; +module.exports.chu =chu; \ No newline at end of file diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" new file mode 100644 index 0000000..526c847 --- /dev/null +++ "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" @@ -0,0 +1,9 @@ +let result=require("./module"); +console.log(result); + + +console.log(result.jia("x",2)); +console.log(result.jia(2,2)); +console.log(result.jian(50,2)); +console.log(result.cheng(50,2)); +console.log(result.chu(50,2)); \ No newline at end of file -- Gitee From 8e90b1af004fe43a6dd7f306b0a3d4f7ca16bc90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Thu, 16 Feb 2023 08:51:19 +0000 Subject: [PATCH 09/10] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\346\226\207\344\273\266\350\257\273\345\217\226/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/.keep" diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/.keep" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 7e03b5d68f32356ad23d500e7a96d39e7ece725e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= <1966813884@qq.com> Date: Thu, 16 Feb 2023 08:51:58 +0000 Subject: [PATCH 10/10] zzb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 朱章彬 <1966813884@qq.com> --- .../demo.js" | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/demo.js" diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/demo.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/demo.js" new file mode 100644 index 0000000..d64e6a8 --- /dev/null +++ "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/demo.js" @@ -0,0 +1,20 @@ +let fs = require("fs"); +for (let i = 1; i <=100; i++) { + fs.writeFileSync("./"+i+".txt",String( Math.floor(Math.random() * 1001))); +} + +let max=0; +for (let i = 1; i <=100; i++) { + + + let data = fs.readFileSync("./"+i+".txt"); + + + console.log(Number(data.toString())); + if(Number(data.toString())>=max){ + max=Number(data.toString()); + } + + +} +console.log("最大值为"+max); -- Gitee