日考18
parent
b6cd18322a
commit
0818a2e8ad
|
@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class TestApplication {
|
public class Test {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
int a=10;
|
int a=10;
|
||||||
int b=20;
|
int b=20;
|
|
@ -1,25 +0,0 @@
|
||||||
package com.bwie.test;
|
|
||||||
|
|
||||||
import com.alibaba.druid.support.json.JSONUtils;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class Test {
|
|
||||||
|
|
||||||
int a=10;
|
|
||||||
int b=20;
|
|
||||||
|
|
||||||
//1.使用BigDecimal进行加法计算,并打印在控制台上。
|
|
||||||
int c=a+b;
|
|
||||||
|
|
||||||
//2.使用BigDecimal进行减法计算,并打印在控制台上。
|
|
||||||
int d=a-b;
|
|
||||||
//3.使用BigDecimal进行乘法计算,并打印在控制台上。
|
|
||||||
int e=a*b;
|
|
||||||
//4.使用BigDecimal进行除法计算,并打印在控制台上。
|
|
||||||
int f=a/b;
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue