This commit is contained in:
parent
e17e4bae53
commit
f1d103ab1e
|
|
@ -1,41 +0,0 @@
|
|||
package live.tomey.api.express.unit;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* @Author 18209
|
||||
* @Date 2021/3/20 21:03
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class Run1 {
|
||||
public static void main(String[] args) {
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
double a, b, sum = 0;
|
||||
String op, ch = "";
|
||||
do {
|
||||
System.out.println(("请输入第一个数:"));
|
||||
a = scanner.nextDouble();
|
||||
System.out.println(("请输入第二个数:"));
|
||||
b = scanner.nextDouble();
|
||||
System.out.println("请输入运算符:");
|
||||
op = scanner.next();
|
||||
if (op.equals("+")) {
|
||||
sum = a + b;
|
||||
} else if (op.equals("-")) {
|
||||
sum = a - b;
|
||||
} else if (op.equals("*")) {
|
||||
sum = a * b;
|
||||
} else if (op.equals("/")) {
|
||||
sum = a / b;
|
||||
} else {
|
||||
System.out.println("错误");
|
||||
continue;
|
||||
}
|
||||
System.out.println("结果" + a + op + b + "=" + sum);
|
||||
System.out.println("是否还要继续运算?(y/n)");
|
||||
ch = scanner.next();
|
||||
} while (ch.equals("y") | ch.equals("Y"));
|
||||
System.out.println("程序结束!");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -24,11 +24,11 @@ spring.servlet.multipart.maxRequestSize=200MB
|
|||
# 数据库dataSource
|
||||
jdbc.driver=8zQIdS8RzOBmd4qRctgYdYM/fdvrjnIJHyQH1bD/jNs=
|
||||
#服务器本地127.0.0.1
|
||||
jdbc.urls=jdbc:mysql://127.0.0.1:3306/mall?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
jdbc.url=jdbc:mysql://127.0.0.1:3306/express?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
#azure
|
||||
jdbc.url=jdbc:mysql://13.75.92.40:3306/mall?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
jdbc.urls=jdbc:mysql://13.75.92.40:3306/express?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
#服务器ip
|
||||
jdbc.username=mall
|
||||
jdbc.username=express
|
||||
jdbc.password=dr4ap4dbnyCMZTcr
|
||||
|
||||
# Mybatis
|
||||
|
|
|
|||
Loading…
Reference in New Issue