欢迎来到天天文库
浏览记录
ID:40954785
大小:303.50 KB
页数:73页
时间:2019-08-11
《计算机三级网络技术50题》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、50题:#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*文章的总行数*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j;/*定义循环控制变量*/intstr;/*存储字符串的长度*/charch;/*存储当前取得的字符*/for(i=0;i2、以行为单位获取字符*/{str=strlen(xx[i]);/*求得当前行的字符串长度*/for(j=0;j3、4、ch<=32)continue;/*如果原字符的ASCII值是偶数或计算后的值小于等于32,则该字符不变*/elsexx[i][j]=ch;/*否则将所对应的字符进行替代*/}}}voidmain(){system("CLS");if(ReadDat()){printf("数据文件5、ENG50.IN不能打开! 07");return;}encryptChar();WriteDat();}intReadDat(void){FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("ENG50.IN","r"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],'');if(p)*p=0;i++;}maxline=i;fclose(fp);return0;}voidWriteDa6、t(void){FILE*fp;inti;fp=fopen("PS50.DAT","w");for(i=0;i#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*文章的总行数*/intReadDa7、t(void);voidWriteDat(void);voidencryptChar(){inti,j;/*定义循环控制变量*/intstr;/*存储字符串的长度*/charch;/*存储当前取得的字符*/for(i=0;i8、9、(ch>='0'&&ch<='9'))10、continue;/*如果计算后的值小于等于32或f(p)对应的字符是数字0至9,则该字符不变*/elsexx[i][j]=ch;/*否则按给定的替代关系进行替代*/}}}voidmain(){system("CLS");if(ReadDat()){printf("数据文件ENG51.IN不能打开! 07");return;}encryptChar();WriteDat();}intReadDat(void){FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("EN11、G51.IN","r"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],'');if(p)*p=0;i++;}maxline=i;fclose(fp);return0;}voidWriteDat(void){FILE*fp;inti;fp=fopen("PS51.DAT","w");for(i=0;i12、ose(fp);}52题#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*文章的总行数*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j;/*定义循环控制变量*/intstr;
2、以行为单位获取字符*/{str=strlen(xx[i]);/*求得当前行的字符串长度*/for(j=0;j3、4、ch<=32)continue;/*如果原字符的ASCII值是偶数或计算后的值小于等于32,则该字符不变*/elsexx[i][j]=ch;/*否则将所对应的字符进行替代*/}}}voidmain(){system("CLS");if(ReadDat()){printf("数据文件5、ENG50.IN不能打开! 07");return;}encryptChar();WriteDat();}intReadDat(void){FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("ENG50.IN","r"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],'');if(p)*p=0;i++;}maxline=i;fclose(fp);return0;}voidWriteDa6、t(void){FILE*fp;inti;fp=fopen("PS50.DAT","w");for(i=0;i#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*文章的总行数*/intReadDa7、t(void);voidWriteDat(void);voidencryptChar(){inti,j;/*定义循环控制变量*/intstr;/*存储字符串的长度*/charch;/*存储当前取得的字符*/for(i=0;i8、9、(ch>='0'&&ch<='9'))10、continue;/*如果计算后的值小于等于32或f(p)对应的字符是数字0至9,则该字符不变*/elsexx[i][j]=ch;/*否则按给定的替代关系进行替代*/}}}voidmain(){system("CLS");if(ReadDat()){printf("数据文件ENG51.IN不能打开! 07");return;}encryptChar();WriteDat();}intReadDat(void){FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("EN11、G51.IN","r"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],'');if(p)*p=0;i++;}maxline=i;fclose(fp);return0;}voidWriteDat(void){FILE*fp;inti;fp=fopen("PS51.DAT","w");for(i=0;i12、ose(fp);}52题#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*文章的总行数*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j;/*定义循环控制变量*/intstr;
3、
4、ch<=32)continue;/*如果原字符的ASCII值是偶数或计算后的值小于等于32,则该字符不变*/elsexx[i][j]=ch;/*否则将所对应的字符进行替代*/}}}voidmain(){system("CLS");if(ReadDat()){printf("数据文件
5、ENG50.IN不能打开! 07");return;}encryptChar();WriteDat();}intReadDat(void){FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("ENG50.IN","r"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],'');if(p)*p=0;i++;}maxline=i;fclose(fp);return0;}voidWriteDa
6、t(void){FILE*fp;inti;fp=fopen("PS50.DAT","w");for(i=0;i#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*文章的总行数*/intReadDa
7、t(void);voidWriteDat(void);voidencryptChar(){inti,j;/*定义循环控制变量*/intstr;/*存储字符串的长度*/charch;/*存储当前取得的字符*/for(i=0;i8、9、(ch>='0'&&ch<='9'))10、continue;/*如果计算后的值小于等于32或f(p)对应的字符是数字0至9,则该字符不变*/elsexx[i][j]=ch;/*否则按给定的替代关系进行替代*/}}}voidmain(){system("CLS");if(ReadDat()){printf("数据文件ENG51.IN不能打开! 07");return;}encryptChar();WriteDat();}intReadDat(void){FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("EN11、G51.IN","r"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],'');if(p)*p=0;i++;}maxline=i;fclose(fp);return0;}voidWriteDat(void){FILE*fp;inti;fp=fopen("PS51.DAT","w");for(i=0;i12、ose(fp);}52题#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*文章的总行数*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j;/*定义循环控制变量*/intstr;
8、
9、(ch>='0'&&ch<='9'))
10、continue;/*如果计算后的值小于等于32或f(p)对应的字符是数字0至9,则该字符不变*/elsexx[i][j]=ch;/*否则按给定的替代关系进行替代*/}}}voidmain(){system("CLS");if(ReadDat()){printf("数据文件ENG51.IN不能打开! 07");return;}encryptChar();WriteDat();}intReadDat(void){FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("EN
11、G51.IN","r"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],'');if(p)*p=0;i++;}maxline=i;fclose(fp);return0;}voidWriteDat(void){FILE*fp;inti;fp=fopen("PS51.DAT","w");for(i=0;i12、ose(fp);}52题#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*文章的总行数*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j;/*定义循环控制变量*/intstr;
12、ose(fp);}52题#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*文章的总行数*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j;/*定义循环控制变量*/intstr;
此文档下载收益归作者所有