day18考试
commit
3492f8dcf2
|
@ -0,0 +1,38 @@
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea/modules.xml
|
||||||
|
.idea/jarRepositories.xml
|
||||||
|
.idea/compiler.xml
|
||||||
|
.idea/libraries/
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### Eclipse ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Mac OS ###
|
||||||
|
.DS_Store
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.bwwei</groupId>
|
||||||
|
<artifactId>day8.7</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.bwwei;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Classname ${NAME}
|
||||||
|
* @Description TODO
|
||||||
|
* @Date 2024/8/7 上午8:35
|
||||||
|
* @Created by 杨旭飞
|
||||||
|
*/
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
//根据需求定义
|
||||||
|
int num1 = 10;
|
||||||
|
int num2 = 5;
|
||||||
|
//1.使用BigDecimal进行加法计算,并打印在控制台上。(20分)
|
||||||
|
System.out.println("加法结论"+"num1 + num2="+(num1 + num2));
|
||||||
|
//2.使用BigDecimal进行减法计算,并打印在控制台上。(20分)
|
||||||
|
System.out.println("减法结论"+"num1 + num2="+(num1 - num2));
|
||||||
|
//3.使用BigDecimal进行乘法计算,并打印在控制台上。(20分)
|
||||||
|
System.out.println("乘法结论"+"num1 * num2="+num1 * num2);
|
||||||
|
//4.使用BigDecimal进行除法计算,并打印在控制台上。(20分)
|
||||||
|
System.out.println("除法结论"+"num1 / num2="+num1 / num2);
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 554 KiB |
Loading…
Reference in New Issue