题目内容:
将文件in.dat中的200个整数读至数组xx中。请编制jsValue()函数,要求:求出数组xx中的数值为奇数的个数cntl和数值为偶数的个数cnt2以及数组xx下标为偶数(包括下标为0的元素)的元素值的算术平均值pJ。 结果cntl,cnt2,pJ输出到out.dat中。
注意:部分源程序存在test.c文件中。
请勿改动数据文件in.dat中的任何数据、主函数main()、读函数read_dat()和输出函数writeDat()的内容。


参考答案:
答案解析: