PROGRAMMING:Shopping (2)
The user has bought several goods (no more than 10 goods). Now, he tells you the price of each goods. You can calculate the average price of these goods.
###Input format:
Several real numbers separated by spaces (no more than 100000 each), with - 1 as the end of the input flag.
###Output format:
A real number, which represents the average price of goods, accurate to two decimal places.
###Input example:
```in
890.78 2769.8 12300 3532.2 -1
```
###Output example:
```out
four thousand eight hundred and seventy-three point one nine
```
answer:If there is no answer, please comment
The difficulty lies in how to get the number of commodities and how to exit the cycle.
If for loop is used, a number is read in the loop without given loop conditions to judge whether it is an end flag. If not, the sum of commodity prices and the number of commodities are accumulated; If so, exit the loop.
If you use the while loop, the loop condition is true, and the rest is the same as the idea of the for loop.
###Input format:
Several real numbers separated by spaces (no more than 100000 each), with - 1 as the end of the input flag.
###Output format:
A real number, which represents the average price of goods, accurate to two decimal places.
###Input example:
```in
890.78 2769.8 12300 3532.2 -1
```
###Output example:
```out
four thousand eight hundred and seventy-three point one nine
```
answer:If there is no answer, please comment
The difficulty lies in how to get the number of commodities and how to exit the cycle.
If for loop is used, a number is read in the loop without given loop conditions to judge whether it is an end flag. If not, the sum of commodity prices and the number of commodities are accumulated; If so, exit the loop.
If you use the while loop, the loop condition is true, and the rest is the same as the idea of the for loop.