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 0000000..8f53df3 Binary files /dev/null and b/out/production/zyjycck1/Main.class differ 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