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

PROGRAMMING:Odd even average

Luz5年前 (2021-05-10)题库457
The average values of even and odd numbers in a batch of non-zero integers are calculated respectively, and zero is used as the termination mark.
###Input format:
Enter n (n < 20) positive integers separated by spaces in a row, and finally enter 0 to end the input. Only one space can be used between the data.
###Output format:
Output the result in the order of "AV1 = even average value, AV2 = odd average value" in one line, and the result retains 2 decimal places without column width control.
###Input example:
```in
2 3 5 6 0
```
###Output example:
```out
av1=4.00,av2=4.00
```
###Input example:
```
1 3 5 0
```
###Output example:
```
av1=0.00,av2=3.00
```
###Input example:
```
2 4 6 0
```
###Output example:
```
av1=4.00,av2=0.00
```






answer:If there is no answer, please comment