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

PROGRAMMING:Calculating piecewise functions (3 branches)

Luz5年前 (2021-05-10)题库395
This topic requires the input of a real number, according to the range of the real number, calculate the value of the piecewise function.
The piecewise function is as follows:
z=ln(x+3) (x>10)
The x power of Z = e (- 3 < x < = 10)
Z = sin (x) / ((COS (x) + 4) others
The data in the program uses the double type.
###Input format:
Enter a real number with double precision
###Output format:
Output function value, the result retains 2 decimal places.
###Input sample 1:
```in
twelve
```
###Output sample 1:
```out
two point seven one
```
###Input sample 2:
```in
five
```
###Output sample 2:
```out
one hundred and forty-eight point four one
```
###Input sample 3:
```in
-9
```
###Output sample 3:
```out
-0.13
```






answer:If there is no answer, please comment