-->
当前位置:首页 > 题库

PROGRAMMING:Jmu-java-02 basic syntax-05-accurate calculation of floating point numbers

Luz5年前 (2021-05-10)题库460
Input several pairs of floating-point numbers, and output the exact sum and product of each pair of floating-point numbers.
The following input examples are two pairs of floating-point numbers. In fact, floating-point numbers with indefinite logarithms may need to be input and calculated.
Note 1: if you use * * Double * * data to calculate directly, you can't get the exact value.
Note 2: when outputting, the toString method of BigDecimal is called directly.
###Input example:
```in
69.1 0.02
1.99 2.01
```
###Output example:
```out
sixty-nine point one two
one point three eight two
four
three point nine nine nine nine
```






answer:If there is no answer, please comment