-
先创建文本文件IN.DAT,在文件中写20个四位整数。
编写函数readDat()把从文件中读出这些数并存入数组a中;编写函数Calvalue( ), 其功...
先创建文本文件IN.DAT,在文件中写20个四位整数。
编写函数readDat()把从文件中读出这些数并存入数组a中;编写函数Calvalue( ), 其功能要求:
1. 求出这文件中共有多少个正整数totNum
2. 求这些数右移1位后, 产生的新数是偶数的数的个数totCnt, 以及满足此条件的这些数(右移前的值)
的算术平均值totPjz。
最后在main( )函数中把所求的结果输出。-First create a text file IN.DAT, wrote in the paper four integer 20. The preparation of function readDat () to read from the file into an array of these and a number of preparation function Calvalue (), its functional requirements: 1. Obtained in this paper the total number of positive integer totNum 2. For those few shifted to right one after the new number is the number of even a few totCnt, as well as to meet the conditions of these (the value of the pre-shifted to right) the arithmetic mean totPjz. Finally, in the main () function to output the results of the request.
- 2022-11-28 05:35:03下载
- 积分:1
-
一个能解决初学者疑难的例子。
一个能解决初学者疑难的例子。-one can solve problems beginners example.
- 2022-07-05 07:12:40下载
- 积分:1
-
吴毕业设计模板(正文)
吴毕业设计模板(正文)-grtgsrt ggtrg
- 2022-03-10 13:18:52下载
- 积分:1
-
MASM ASM拆卸工具
MASM A TOOL FOR ASM DISASSEMBLE
- 2022-05-18 02:48:48下载
- 积分:1
-
windows环境的编程 一个文件
windows环境的编程 一个文件-windows environment of a programming document
- 2022-12-07 20:25:03下载
- 积分:1
-
JPG标准1,开发JPEG必备的资料
JPG标准1,开发JPEG必备的资料-Standard of JPG1, it is necessary for JPEG development.
- 2022-09-26 11:05:03下载
- 积分:1
-
CExeSourceCode.zip
CExeSourceCode.zip
- 2022-01-21 22:13:11下载
- 积分:1
-
一篇绝对不能错过的好文章!
一篇绝对不能错过的好文章!-absolutely not miss a good article!
- 2023-02-04 10:05:04下载
- 积分:1
-
差分载波定位
差分载波定位 -Differential carrier positioning
- 2022-06-15 15:54:46下载
- 积分:1
-
asp.net常用函数
asp.net常用函数-asp.net common function
- 2023-08-16 04:20:02下载
- 积分:1