PROGRAMMING:Calculating pi by Monte Carlo method
The method of Monte Carlo simulation is used to calculate the PI( See the operation instruction for specific requirements
[2020-oo 5th operation-2 instruction v1.0. PDF] (~ / cf85405e-bd61-4bf1-8641-c8af28d902da. PDF)
)
###Input format:
Enter four real numbers and an integer number from the keyboard, which are the abscissa, ordinate, rectangle length, rectangle width and casting times of the upper left corner of the rectangle. The numbers can be separated by one or more spaces or carriage returns.
###Output format:
*If the length and width of the rectangle are not equal (non square) or the length and width data are illegal, "wrong format" is output.
*If the estimated π If the difference with math.pi is less than 1e-4, "success" will be output, otherwise, "failed" will be output.
###Input example:
Here is a set of inputs. For example:
```in
0 0 1 1 20000000
```
###Output example:
The corresponding output is given here. For example:
```out
Success
```
answer:If there is no answer, please comment
Please refer to the operation instruction for specific class design
[2020-oo 5th operation-2 instruction v1.0. PDF] (~ / cf85405e-bd61-4bf1-8641-c8af28d902da. PDF)
)
###Input format:
Enter four real numbers and an integer number from the keyboard, which are the abscissa, ordinate, rectangle length, rectangle width and casting times of the upper left corner of the rectangle. The numbers can be separated by one or more spaces or carriage returns.
###Output format:
*If the length and width of the rectangle are not equal (non square) or the length and width data are illegal, "wrong format" is output.
*If the estimated π If the difference with math.pi is less than 1e-4, "success" will be output, otherwise, "failed" will be output.
###Input example:
Here is a set of inputs. For example:
```in
0 0 1 1 20000000
```
###Output example:
The corresponding output is given here. For example:
```out
Success
```
answer:If there is no answer, please comment
Please refer to the operation instruction for specific class design