文件名称:5
介绍说明--下载内容均来自于网络,请自行研究使用
函数ReadDat()实现从文件ENG.IN中读取一篇英文文章,存入到字符串数组xx中;请编制函数encryptChar(),按给定的替代关系对数组xx中的所有字符进行替代,仍存入数组xx的对应的位置上,最后调用函数WriteDat()把结果xx输出到文件PS2.DAT中。
替代关系:f(p)=p*13 mod 256(p是数组中某一个字符的ASCII值,f(p)是计算后新字符的ASCII值),如果计算后f(p)值小于等于32或其ASCII值是偶数,则该字符不变,否则将f(p)所对应的字符进行替代。-Function ReadDat () to read from a file ENG.IN an article in English, into the string array in xx Prepare function encryptChar (), according to the given array of alternative relations xx replace all the characters, xx still deposit the corresponding array position, and finally call the function WriteDat () output the results to a file PS2.DAT in xx. Alternative relations: f (p) = p* 13 mod 256 (p is the array one character ASCII value, f (p) is the calculated value of the new ASCII characters), if the calculated f (p) value less than or equal or the ASCII value of 32 is even, then the character unchanged, otherwise f (p) replaced by the corresponding characters.
替代关系:f(p)=p*13 mod 256(p是数组中某一个字符的ASCII值,f(p)是计算后新字符的ASCII值),如果计算后f(p)值小于等于32或其ASCII值是偶数,则该字符不变,否则将f(p)所对应的字符进行替代。-Function ReadDat () to read from a file ENG.IN an article in English, into the string array in xx Prepare function encryptChar (), according to the given array of alternative relations xx replace all the characters, xx still deposit the corresponding array position, and finally call the function WriteDat () output the results to a file PS2.DAT in xx. Alternative relations: f (p) = p* 13 mod 256 (p is the array one character ASCII value, f (p) is the calculated value of the new ASCII characters), if the calculated f (p) value less than or equal or the ASCII value of 32 is even, then the character unchanged, otherwise f (p) replaced by the corresponding characters.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
5.c