day18考试

master
yangpeng 2024-08-07 08:44:07 +08:00
commit 3492f8dcf2
4 changed files with 79 additions and 0 deletions

38
.gitignore vendored 100644
View File

@ -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

17
pom.xml 100644
View File

@ -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>

View File

@ -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);
}
}

BIN
效果/img.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 KiB