From c744c9e16845fd2c2e7fe6a8fb2b2427ed0cb662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BD=AF=E5=B7=A5=E8=AF=BE?= <3126127194@qq.com> Date: Thu, 10 Oct 2024 17:29:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B9=E7=9B=AE=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 8 ++++ .idea/misc.xml | 6 +++ .idea/modules.xml | 8 ++++ .idea/vcs.xml | 6 +++ out/production/zyjycck1/.idea/.gitignore | 8 ++++ out/production/zyjycck1/.idea/misc.xml | 6 +++ out/production/zyjycck1/.idea/modules.xml | 8 ++++ out/production/zyjycck1/.idea/vcs.xml | 6 +++ out/production/zyjycck1/12 | 47 ++++++++++++++++++++++ out/production/zyjycck1/Main.class | Bin 0 -> 1792 bytes out/production/zyjycck1/README.md | 2 + out/production/zyjycck1/zyjycck1.iml | 11 +++++ zyjycck1.iml | 11 +++++ 13 files changed, 127 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 out/production/zyjycck1/.idea/.gitignore create mode 100644 out/production/zyjycck1/.idea/misc.xml create mode 100644 out/production/zyjycck1/.idea/modules.xml create mode 100644 out/production/zyjycck1/.idea/vcs.xml create mode 100644 out/production/zyjycck1/12 create mode 100644 out/production/zyjycck1/Main.class create mode 100644 out/production/zyjycck1/README.md create mode 100644 out/production/zyjycck1/zyjycck1.iml create mode 100644 zyjycck1.iml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..6f29fee --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..37fbdba --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/zyjycck1/.idea/.gitignore b/out/production/zyjycck1/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/out/production/zyjycck1/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/out/production/zyjycck1/.idea/misc.xml b/out/production/zyjycck1/.idea/misc.xml new file mode 100644 index 0000000..6f29fee --- /dev/null +++ b/out/production/zyjycck1/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/zyjycck1/.idea/modules.xml b/out/production/zyjycck1/.idea/modules.xml new file mode 100644 index 0000000..37fbdba --- /dev/null +++ b/out/production/zyjycck1/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/out/production/zyjycck1/.idea/vcs.xml b/out/production/zyjycck1/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/out/production/zyjycck1/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/zyjycck1/12 b/out/production/zyjycck1/12 new file mode 100644 index 0000000..4c9ffe2 --- /dev/null +++ b/out/production/zyjycck1/12 @@ -0,0 +1,47 @@ + +import java.util.Scanner; + +public class Main { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + System.out.println("请输入数字: "); + double num1 = scanner.nextDouble(); + + System.out.println("请输入操作符 (+, -, *, /, %): "); + char operator = scanner.next().charAt(0); + + System.out.println("请输入数字: "); + double num2 = scanner.nextDouble(); + + double result = 0; + + switch (operator) { + case '+': + result = num1 + num2; + break; + case '-': + result = num1 - num2; + break; + case '*': + result = num1 * num2; + break; + case '/': + if (num2 != 0) { + result = num1 / num2; + } else { + System.out.println("错误!除数不能为零。"); + return; + } + break; + case '%': + result = num1 % num2; + break; + default: + System.out.println("无效的操作符!"); + return; + } + + System.out.println("计算的结果是: " + result); + } +} diff --git a/out/production/zyjycck1/Main.class b/out/production/zyjycck1/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..8f53df35fecb664b7dd04a20b75b92c32f8facf0 GIT binary patch literal 1792 zcmaJ?ZBrXn6n-vw*(GeDK%psBnpUt0Z&B2?kcusdSTwZNU}~*8a|tVKNp>^4n@;)S zw7!gvV`p?|hf+I^?>ZHWWfT}H%=lIP7t#Qq{0Hi}n^1!=X6Eia=iKx1+~=M-`Sq{G zWdO(Vnh#}gNpLIhz{{}nJioxhX|9iiPYs<{Q#OP5sHSUn4}&WhN=lF!svW1Ct);_> z6xVgtEQb#j5)=hHP`N2fV%)OT3`3cwGt|YMNX-cM>)D*0uuYX`B0fmiDe6}<_=DTJ zgp#5{t%6;sBOpeOaQ&O?w5jPE$z<$iXjq$>Ut6BI_s&T<*)s4@B7K_ zfDe1nAYre92k;<6?FOKd91K!cWK0XhMLZ58gjdr?BB7)}yiY*@`x$(?deM#V0G%I)*2N~QV4a2Trs6aqz zK_5bBkgWO@UCT^s7I>}8< z=tZO39@QwVH!gxB6rFLB)CbRPB`lPrb8e21f9*EM^uSi3Z|S@cUE0hdxt_}qM=Zu5 z8(G!lwqcSQEu3@`3{$moX(D__!se;50iJbWO6aAINEkUYrS@r}BgzHb4$)=waJ`0M zTeiuw1FAi03|lguXQ)}b{n_g6$<@0P`A=@!tl#bSxA*!S&&^YBj|TV=R}AY$dJ4vMF$IJgaWwUdn4> zR76VOyO<)%)9Hj}tHi0&FD6Aa%`Ho{B)rVfyyZ^YL6z_db?g7TioS5}h5a}}6HWZe zz{E_WZ#QXS+8OPhmU*x{&T)jk;uvt_D1DWJ1D-?=Y2|nd$H+p#>|63EC)@9LA)TE? z`8+l4ENW`%=iqOhLu0>C4iuCo*BpX}+``gPJnr&Tc1d;aTa*E~NUNDvn3hr0g>7RE zkSvf1JyzV4LBA)}C4GZqB#a2*FbQKq=*5(N_#kWowb^pg}IHd;`LPE--0)#O)8i0beL>T#Jo-ldrLu@@iG z7@a^PZeSn2Ao9P%0Zh|Go5ex=L}P1-vMi$=zoEn7xQFTxkMz&eOM3-=L6mMub00tA zY4p*fwcv9+gA>H~5nM$-**sMJBRorzgy$%#0rKAj#w#H%L2@yd3y@{GiWc2S@K=VD YI7PcmnO~rF8ZVLNBk3&8;Z^MU2ecN~$^ZZW literal 0 HcmV?d00001 diff --git a/out/production/zyjycck1/README.md b/out/production/zyjycck1/README.md new file mode 100644 index 0000000..ccabc09 --- /dev/null +++ b/out/production/zyjycck1/README.md @@ -0,0 +1,2 @@ +# zyjycck + diff --git a/out/production/zyjycck1/zyjycck1.iml b/out/production/zyjycck1/zyjycck1.iml new file mode 100644 index 0000000..b107a2d --- /dev/null +++ b/out/production/zyjycck1/zyjycck1.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/zyjycck1.iml b/zyjycck1.iml new file mode 100644 index 0000000..b107a2d --- /dev/null +++ b/zyjycck1.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file