找回密码
 立即注册
求出整数thefunction | 邮电通讯系统 2022-08-10 72 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
已知在文件IN.DAT中存有若干个(个数lt;200)四位数字的正整数,函数ReadDat()是读取这若干个正整数并存入数组xx中。请编制函数CalValue(),其功能恳求:1.求出这文件中共有多少个正整数totNum;2.求出这些数中的各位数字之和是奇数的数的个数totCnt,以及满足此条件的这些数的算术平均值totPjz,终究调

(It is known that there are several (number lt; 200) four-digit positive integers in the file IN.DAT. The function ReadDat() reads these positive integers and stores them in the array xx. Please compile the function CalValue(), its function request: 1. Find out how many positive integers totNum are in this file; 2. Find the number totCnt of the numbers whose sums are odd numbers, and satisfy this condition The arithmetic mean totPjz of these numbers, after all, adjusts)

[下载]14223688165.rar




上一篇:光纤通信___第8章 光纤通信网络
下一篇:光纤光栅的非线性效应及其在光纤通信中的应用前景