全国计算机等级考试三级C语言上机100题1

全国计算机等级考试三级C语言上机100题1

ID:83393656

大小:15.23 MB

页数:148页

时间:2023-07-15

上传者:灯火阑珊2019
全国计算机等级考试三级C语言上机100题1_第1页
全国计算机等级考试三级C语言上机100题1_第2页
全国计算机等级考试三级C语言上机100题1_第3页
全国计算机等级考试三级C语言上机100题1_第4页
全国计算机等级考试三级C语言上机100题1_第5页
全国计算机等级考试三级C语言上机100题1_第6页
全国计算机等级考试三级C语言上机100题1_第7页
全国计算机等级考试三级C语言上机100题1_第8页
全国计算机等级考试三级C语言上机100题1_第9页
全国计算机等级考试三级C语言上机100题1_第10页
资源描述:

《全国计算机等级考试三级C语言上机100题1》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

ᐰὃC100⚪ਮ⚪1ᑏᦪjsValue(intm,intk,intxx[D+,ᦪḄ./012ᜧ4᦮ᦪm67☠mḄk9ᦪ:ᐭᦪ?஺ᨬBCᵨᦪwriteDat஺GH10<ᦪI+ᑖKLMNO6PNOQMᑮᦻTout.datX஺YᑖZ[\:ᙠᦻTprogl.cX஺a᝞1cQᐭ175ᑣgQM119,23,29,31,37஺lᦋnoᦪmain஺pᑏᦪwriteDat஺Ḅᑁr஺#include#includevoidreadwriteDat();intisP(intm)(inti;for(i=2;i0;m++)if(isP(m)){xx[s++]=m;k—;})main()(intm,n,xx[1000];clrscr();printf("

1Pleaseentertwointegers:'*);scanf("d%d\&m,&n);num(m,n,xx);for(m=0;m

2n);readwriteDat();)voidreadwriteDat()(intm,n,xx[1000],i;FILE

3rf=fopen("in.dat,,,'+rn);wf=fopen(,'out.dat,\',w");for(i=0;i<10;i++){fscanf(rf/%d%du,&m,&n);num(m,n,xx);for(m=0;m)fclose(rf)fclose(wf);ਮ⚪2ᦪIᦻTIN.DATX:ᨵ200ᦪ+CᵨGᦪreadDat஺Pᦪ:ᐭᦪ

4fclose(fp);voidmain()(inti;readDat();jsVal();printf("¡ᩩTḄᦪ=%d

5”,ent);for(i=0;i

6");writeDatO)writeDat()(FILE*fp;inti;fp=fopenC^ut.dat",nwu);fprintf(fp,"%d

7",ent);for(i=0;i

8,',b[i]);fclose(fp);ਭ⚪3ᦪReadDat()·¸¥ᦻTIN.DATXGH¹ºᦻᦻ»:ᐭᑮª¼ᦪ

9intReadDat(void);voidWriteDat(void);voidStrOR(void){inti,righto,j,s,k;chartem[80J;for(i=0;ifor(j=strlen(xx[i])-l;j>=O;j—){k=0;memset(tem,0,80);if(xx[ij[j]=='o,){righto=j;for(s=righto+1;stem[k++]=xx[i][s];for(s=0;sif(xx[i][s]!=o')tem[k++]=xx[i][s];strcpy(xx[i],tem);)elsecontinue;voidmain(){clrscr();if(ReadDat()){printf("ᦪIᦻTIN.DATâ/ᡭä!

10\007");return;)StrOR();WriteDat();)intReadDat(void){FILE*fp;inti=0;char*p;if((fp=fopenCIN.DAT"JT"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],'

11');

12if(p)*p=0;i++;)maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;clrscr();fp=fopen("OUT5.DAT“+“w")for(i=0;i

13,',xx[ij);fprintf(fp,u%s

14n,xx[i]);)fclose(fp);ਭ⚪4ᦪReadDat஺·¸¥ᦻTIN.DATXGH¹ºᦻᦻ»:ᐭᑮª¼ᦪ

15intReadDat(void);voidWriteDat(void);voidStrOL(void){inti,j,k,s,m,strl;charstr[80];for(i=0;i=O;j-){if(isalpha(xx[i][j]))k++;else{for(m=1;m<=k;m++)str[s+4-]=xx[i][j+m];k=0;)if(!isalpha(xx[i][j]))str[s++]='*;)for(m=1;m<=k;m++)str[s++]=xx[i][j+m];str[s]=^';strcpy(xx[i],str);}voidmain()(clrscr();if(ReadDat()){printf("ᦪIᦻTIN.DATâ/ᡭäì

16\007”);return;)StrOU);WriteDat();intReadDat(void)1FILE*fp;inti=0;char*p;if((fp=fopen(,,IN.DAT,,,r"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){

17p=strchr(xx[i]An*);if(p)*p=O;i++)maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;clrscr();fp=fopen(nOUT6.DATu,wu);for(i=0;i

18”,xx[i]);fprintf(fp,H%s

19H,xx[i]);)fclose(fp);ਮ⚪5ᙠᦻTin.datXᨵ200í᦮ᦪ+6Øᦪᙳᙠ1000î9999Ðï஺ᦪReadDat()GH200ᦪ:Èᑮᦪ

20for(i=0;i<199;i++)for(j=i+lj<200;j++)if(aafi]%1000>aa[j]%1000llaa[i]%1000==aa[j]%1000&&aa[i]for(i=0;i<10;i++)bb[i]=aa[i];)voidmain()(readDat();jsSort();writeDat();)readDat()(FILE*in;inti;in=fopen(,,in.datu,,,rM);for(i=0;i<200;i++)fscanf(in,n%d\&aa[i]);fclose(in);)writeDat()(FILE*out;inti;clrscr();out=fopen("out.dat,',,,wu);for(i=0;i<10;i++){printf(n%d,',bb[i]);fprintf(out,n%d

21H,bb[i]);)fclose(out);)ਮ⚪6ᙠᦻTin.datXᨵ200í᦮ᦪ+6Øᦪᙳᙠ1000î9999Ðï஺ᦪReadDat஺GH200ᦪ:Èᑮᦪ

22ᦻTout.datX஺a1ᜐᳮô90125099601270258088ᜐᳮB50998088702560129012¬1YᑖZ[\®ùM஺lᦋnoᦪmain஺ஹGᦪIᦪReadDat஺pQMᦪIᦪWriteDat஺Ḅᑁr஺#include#include#includeintaa[200],bb[10];voidjsSort()(inti,j,data;for(i=0;i<199;i-H-)for(j=i+lj<200;j++)if(aali]%1000aa|jJ){data=aa[i];aa[i]=aa[jl;aa[jl=data;}for(i=0;i<10;i++)bb[i]=aa[i];)voidmain()(readDat();jsSort();writeDat();systemCpause");)readDat()(FILE*in;inti;in=fopen("in.dat,,,',rn);for(i=0;i<200;i++)fscanf(in,H%d,M,&aa[i]);fclose(in);)writeDat()FILE*oul;

23inti;clrscr();out=fopen("out.dat",nwn);for(i=0;i<10;i++){printf(ni=%d,%d

24n,i+l,bb[i]);fprintf(outj%d

25",bb[i]);}fclose(out);)ਮ⚪7ᙠᦻTIN.DATX:ᨵ100úû├ýþÿ├ᵫṹdm(4)me(10)ᓫdj(᦮)ᦪsi(᦮)je(᦮)ᑖᡂ஺ᐸ#$=ᓫ*ᦪ'()*஺+ᦪReadDat(),-./100├01ᐭ3᪀ᦪsell#஺56ᑴ+ᦪSortDat஺ᐸ89⌕;$ᢥṹ=ᜧᑮ@AB᣸ᑡEṹFGᑣᢥ=ᜧᑮ@AB᣸ᑡᨬJ᣸ᑡ3KL1ᐭ3᪀ᦪsell#ᨬMNᵨ+ᦪWriteDat஺P3KQ*ᑮᦻSOUT6.DAT#஺ᑖTUV1ᙠᦻSprogl.c#஺5XᦋZ[+ᦪmain஺ஹ-ᦪ]+ᦪReadDat஺^Q*ᦪ]+ᦪWriteDat஺Ḅᑁa஺#include#include#include#include#include#defineMAX100typedefstruct{chardm[5];/*ṹ*/char*/intdj;/*ᓫ*/intsi;/*ᦪ*/longje;/*}PRO;PROsell[MAX];voidReadDat();voidWriteDat();voidSortDat(){intij;PROxy;for(i=0;i<99;i++)for(j=i+l;j

26if(strcmp(sell[i].dm,sell[j].dm)

27",seU[i].dm,sell[i].mc,sell[i].dj,selI[i].sl,sell[i].je);fprintf(fp,"%s%s%4d%5d%5d

28M,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);)fclose(fp);

29ਭ⚪f8+ᦪReadDat()gh=ᦻSENGIN#-.ijkᦻᦻl1ᐭᑮmᦪxx#c56ᑴ+ᦪencryptChar஺ᢥnoḄpᐵrsᦪxx#ḄᡠᨵABpL1ᐭᦪxxḄsvḄwxᨬMNᵨ+ᦪWriteDat஺P3KxxQ*ᑮᦻSPS1.DAT#஺pᐵr$f(p)=p*llmod256(p,ᦪ#yiḄASCIIzf(p),'(M{ḄASCIIz)᝞K'(Mf(p)z@}~}32ᡈᜧ}130,ᑣᔲᑣf(p)ᡠsvḄABp஺(#ᵨ᦮)ᑖTUV1ᙠᦻSprogl.c#஺ᦪ]ᦻS1Ḅ,$BḄᙳ@}80஺5XᦋZ[+ᦪmain஺ஹ-ᦪ]+ᦪReadDat஺^Q*ᦪ]+ᦪWriteDat஺Ḅᑁa஺#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*ᦻlḄBᦪ*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,jcfor(i=0;i130)continue;elsexx[i][j]=xx[i]U]*l1%256;voidmain()(clrscr();if(ReadDat()){printf("ᦪ]ᦻSENGIN9ᡭ!

30\007H);return;)encryptChar();WriteDat();intReadDat(void)

31FILE*fp;inti=0;unsignedchar*p;if((fp=fopen(neng.in",nru))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i]^n,);if(p)*p=O;i++c)maxline=i;fclose(fp);return0;1voidWriteDat(void)(FILE*fp;inti;fp=fopen("ps1.dat"V'w");for(i=0;i

32”,xx[i]);fprintf(fp,H%s

33",xx[i]);)fclose(fp);ਭਮ⚪f9+ᦪReadDat()gh=ᦻSIN.DAT#-.ijkᦻᦻl1ᐭᑮmᦪxx#56ᑴ+ᦪSortCharD(),ᐸ+ᦪḄ89,$Bᓫsᢥ=ᜧᑮ@ḄVAB᣸V᣸VMḄ3KLᢥB{1ᐭmᦪxx#ᨬMNᵨ+ᦪwriteDal஺P3KxxQ*ᑮᦻSOUT2.DAT#஺$ᦻ$dAe,BfC.CCbbAA3K$fedCBA.bbCCAAᦪ]ᦻS1Ḅ,$BḄᙳ@}80᪗¡^¢஺ᑖTUV1ᙠᦻSprogl.c#஺5XᦋZ[+ᦪmain஺ஹ-ᦪ]+ᦪReadDat஺^Q*ᦪ]+ᦪwriteDat஺Ḅᑁa஺#include#include

34#includecharxx[50]l80J;intmaxline=O;/*ᦻlḄBᦪ*/intReadDat(void);voidWriteDat(void);voidSortCharD(void){inti,j,k,strl;charch;for(i=0;i

35\007”);return;)SortCharD();WriteDatO;intReadDat(void)(FILE*fp;inti=0;char*p;if((fp=fopen("IN.DAT,,c,r,,))==NULL)return1;while(fgets(xx[i],8O,fp)!=NULL){p=strchr(xx[i]An')cif(p)*p=O;i++c

36maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;fp=fopen(,'OUT2.DAT"c,wu);for(i=0;i

37",xx[i]);fprintf(fp,n%s

38",xx[i]);)fclose(fp);)ਭਮ⚪f10+ᦪReadDat()gh=ᦻSIN.DAT#-.ijkᦻᦻl1ᐭᑮmᦪxx#56ᑴ+ᦪConvertCharA(),ᐸ+ᦪḄ89,$BᓫPm#Ḅᡠᨵ@ᑏ¥ᦋᑏᡂ¥Ḅ¦i¥᝞K,¥z,ᑣᦋᑏᡂ¥a஺ᜧᑏ¥Lᜧᑏ¥@ᑏ¥L@ᑏ¥ᐸ§஺P¨ᜐᳮḄmLᢥB{1ᐭmᦪxx#ᨬMNᵨ+ᦪwriteDat஺P3KxxQ*ᑮᦻSOUT1.DAT#஺$ᦻ:Adb.Bcdzaabck.LLhj3K$Aec.Bdeabbcdl.LLikᦪ]ᦻS1Ḅ,$BḄᙳ@}80᪗¡^¢஺ᑖTUV1ᙠᦻSprogl.c#஺5XᦋZ[+ᦪmain஺ஹ-ᦪ]+ᦪReadDat஺^Q*ᦪ]+ᦪwriteDat஺Ḅᑁa஺#include#include#includecharxx[50][80];intmaxline=0;/*ᦻlḄBᦪ*/intReadDat(void);voidWriteDat(void);voidConvertCharA(void)

39inti,j;for(i=0;i=*a'&&xx[i][j]<=y)xx[i]|j]+=l;voidmain()(clrscr();if(ReadDat()){printf("ᦪ]ᦻSIN.DAT9ᡭ£

40\007”);return;)ConvertCharA();WriteDat();IintReadDat(void)FILE*fp;inti=0;char*p;if<(fp=fopen("IN.DATV'r"))==NULL)return1;while(fgets(xx[i],8O,fp)!=NULL){p=strchr(xx[i]An*);if(p)*p=O;i++c)maxline=i;fclose(fp);return0;IvoidWriteDat(void)FILE*fp;inti;clrscr();fp=fopen(',OUTl.DATuc'wu);for(i=0;i

41printf(',%s

42,',xx[ij);fprintf(fp,n%s

43n,xx[i]);)fclose(fp);)ਮ⚪f11UVprogl.cḄ89,$Psm#Ḅᡠᨵ¥ᦋᑏᡂ¥Ḅ¦i¥¥zᦋᑏᡂ¥a஺⌕;ᜧᑏ¥Lᜧᑏ¥@ᑏ¥L@ᑏ¥ᐸçèᦋ஺5ὃê6ᑏ+ᦪchg(char*s)ghUV⌕;ᨬMNᵨ+ᦪreadwriteDAT()P3KQ*ᑮᦻSbeLout#஺᝞$sm#ᨵḄᑁa$Mn.l23Zxy,ᑣNᵨ+ᦪM3K$No.l23Ayz஺$ᑖTUV1ᙠᦻSprogl.cᦻS#஺5XᦋZ[+ᦪmain()^Q*ᦪ]+ᦪreadwriteDAT()Ḅᑁa஺#include#include#include#include#defineN81voidreadwriteDAT();voidchg(char*s){intI;for(I=0;I=,a'&&s[i]<=,y1ls[i]>='A'&&s[i]<='Y,)s[i]+=l;)main()(chara[N];clrscr();printf(nEnterastring:");gets(a);printf("Theoriginalstringis:")cputs(a);chg(a);printf(MThestringaftermodified:");puts(a);readwriteDAT();)voidreadwriteDAT()(inti;chara[N];FILE*rf,*wf;

44rf=fopen(nbcl.inn,"rn);wf=fopen("bcl.out""w");for(i=0;i<50;i++){fscanf(rf,n%sn,a);chg(a);fprintf(wf,u%s

45M,a);)fclose(rf);fclose(wf);ਭਮ⚪f12¨ëᙠᦻSIN.DAT#1ᨵ100├├ᵫṹdmì4ímeì10í,ᓫdjì᦮íᦪsiì᦮íjeì᦮íᑖᡂ஺ᐸ#$=ᓫ*ᦪ'()*஺+ᦪReadDat஺,-./100├01ᐭ3᪀ᦪsell#஺56ᑴ+ᦪSortDat஺ᐸ89⌕;$ᢥ=@ᑮᜧAB᣸ᑡEF~ᑣᢥ=@ᑮᜧAB᣸ᑡᨬJ᣸ᑡ3KL1ᐭ3᪀ᦪsell#ᨬMNᵨ+ᦪWriteDatP3KQ*ᑮᦻSOUT5.DAT#஺ᑖTUV1ᙠᦻSprogl.c#஺5XᦋZ[+ᦪmain஺ஹ-ᦪ]+ᦪReadDat஺^Q*ᦪ]+ᦪWriteDat஺Ḅᑁa஺#include#include#include#include#include#defineMAX100typedefstruct{chardm[5];/*ṹ*/charmc[ll];/*intdj;/*ᓫ*/intsi;/*ᦪ*/longje;/**/}PRO;PROsell[MAX];voidReadDat;voidWriteDat;voidSortDat(){intijcPROxy;

46for(i=0;i<99;i++)for(j=i+1;jOllstrcmp(sell[i].mc,sell[j].mc)==O&&sell[i].je>sell[j].je){xy=sell[i];sell[i]=sell[j];sellfj]=xy;}voidmain()(memset(sell,0»sizeof(sell));ReadDat();SortDat();WriteDat();)voidReadDat()FILE*fp;charstr[8O],chf11];inti;fp=fopen("IN.DAT"c'r,');for(i=0;i<100;i++){fgets(str,8O,fp);memcpy(sellfi].dm,str,4);memcpy(sell[i].mc,str+4,10);memcpy(ch,str+14,4)cch[4]=0;sell[i].dj=atoi(ch);memcpy(ch,str+18,5);ch[5]=0;sell[i].sl=atoi(ch);sell[i].je=(long)sell[i].dj*sell[i].si;)fclose(fp);voidWriteDat()FILE*fp;inti;fp=fopen(nOUT5.DATnc,wu);for(i=0;i

47,,,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);fprintf(fp,'1%s%s%4d%5d%5d

48",sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);

49fclose(fp);⚪f13¨ëᙠᦻSIN.DAT#1ᨵ100├├ᵫṹdm(4)me(10)ᓫdj(᦮)ᦪsi(᦮)je(᦮)ᑖᡂ஺ᐸ#$=ᓫ*ᦪ'()*஺+ᦪReadDat஺,-./100├01ᐭ3᪀ᦪsell#஺56ᑴ+ᦪSortDat஺ᐸ89⌕;$ᢥṹ=@ᑮᜧAB᣸ᑡEṹF~ᑣᢥ=ᜧᑮ@AB᣸ᑡᨬJ᣸ᑡ3KL1ᐭ3᪀ᦪsell#,ᨬMNᵨ+ᦪWriteDat஺P3KQ*ᑮᦻSOUT9.DAT#஺ᑖTUV1ᙠᦻSprogl.c#஺5XᦋZ[+ᦪmain஺ஹ-ᦪ]+ᦪReadDat஺^Q*ᦪ]+ᦪWrileDat஺Ḅᑁa஺#include#include#include#include#include#defineMAX100typedefstruct{chardm[5];/*ṹ*/char*/intdj;/*ᓫ*/intsi;/*ᦪ*/longje;/**/}PRO;PROsell[MAX];voidReadDat();voidWriteDat();voidSortDat(){inti,j;PROxy;for(i=0;i<99;i++)for(j=i+1;j<100;j++)if(strcmp(sell[i].dm,sell[j].dm)>Ollstrcmp(sell[i].dm,sellfj].dm)==O&&sell[i].je

50memset(sell,0,sizeof(sell));ReadDat();SortDat();WriteDat();)voidReadDat()(FILE*fp;charstr[8O],ch[ll];inti;fp=fopen(nIN.DATn,nrM);for(i=0;i<100;i++){fgets(str,8O,fp);memcpy(sell[i].dm,str,4);memcpy(sell[i].mc,str+4,10);memcpy(ch,str+14,4)cch[4]=0;sell[i].dj=atoi(ch);memcpy(ch,str+18,5);ch[5]=0;sell[i].sl=atoi(ch);sell[i].je=(long)sell[i].dj*sell[i].sl;)fclose(fp);)voidWriteDat()(FILE*fp;inti;fp=fopenC'OUT9.DATuc,w");for(i=0;i

51n,sell[i].dm,sell[i].mc,seil[i].dj,sell[i].sl,sell[i].je);fprintf(fp/'%s%s%4d%5d%5d

52",sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);)fclose(fp);)ਭਮ⚪f14¨ëᦪ]ᦻSIN.DAT#1ᨵ200îᦪ0¨Nᵨ-+ᦪreadDat஺P/ïᦪ1ᐭᦪa#5ὃê6ᑴi+ᦪjsVal(),ᐸ89,$ðñ=ᦪa#.*iîᦪ᝞Kîᦪòóᜧ}îᦪMḄᦪôᦪ,᜻ᦪ(îᦪMöᦪᑣ÷'),

53ᑣ÷'*öøùᩩSḄᦪent0P/ïîᦪᢥ=@ᑮᜧḄV1ᐭᦪb#ᨬMNᵨᑏ+ᦪwriteDat()P3Kentûᦪb#ᔠᩩSḄîᦪQ*ᑮOUT.DATᦻS#஺$ᑖTUV1ᙠᦻSprogl.c#஺UV#¨oýᦪ$a[200],b[200],¨oý$ent5XᦋZᦪ]ᦻSIN.DAT#Ḅþÿᦪஹᦪmain஺ஹᦪreadDat஺ᑏᦪwriteDat()Ḅᑁ஺#include#defineMAX200inta[MAX],b[MAXJ,ent=0;voidjsVal()(inti,j,flag;for(i=0;ia[j]&&a[i]%2)flag=l;else{flag=O;break;}if(flag==l)b[cnt++]=a[i];)for(i=0;ib[j]){flag=b[i];b[i]=bfj];b[j]=flag;}voidreadDat()(inti;FILE*fp;fp=fopen(nin.dat",Hrn);for(i=0;i

54”,ent);for(i=0;i

55");writeDat();writeDat()

56FILE*fp;inti;fp=fopenC'out.dat","w");fprintf(fp,ent);for(i=0;i

57u,b[i]);fclose(fp);)ਭ⚪15ᦪᦻIN.DATᨵ200ᦪ!ᵨᦪreadDat஺#$%ᦪᐭᦪ'a(ὃ*+ᑴ-ᦪjsVal(),ᐸ/0123-ᦪḄᓟᦪ56Ḅ789:9;ᦪ56Ḅ7;ᦪ56Ḅ789:9ᓝᦪ56Ḅ7=>ᓝᦪ56Ḅ789:9ᦪ56Ḅ7?@ᦪ1ᏔᦪᑣCDEFᩩḄᦪent#$%ᦪᢥH8ᑮᜧḄKLᐭᦪ'bᨬN!ᵨᑏᦪwriteDat()#OPent=>ᦪ'bQᔠᩩḄᦪSEᑮOUT.DATᦻ஺TU2VᑖXYLᙠᦻprogl.c஺YL[\ᦪ'2a[200],b[200],[\]^2ent(_ᦋaᦪᦻIN.DATḄbcᦪஹᦪmain஺ஹᦪreadDat()ᑏᦪwriteDat()Ḅᑁ஺#include#defineMAX200inta[MAX],b[MAX],cnt=0;voidjsVaK){inti,j;intqw,bw,sw,gw;for(i=0;ib[j]){qw=b[i];b[i]=b[j];b|j]=qw;)voidreadDat(){inti;FILE*fp;

58fp=fopen("in.dat"T‘);for(i=0;i

59”,ent);for(i=0;i

60M);writeDatO)writeDat()(FILE*fp;inti;fp=fopen("out.dat",Hwu);fprintf(fp,"%d

61",ent);for(i=0;i

62",b[i]);fclose(fp);)ਭਮ⚪16ᦪReadDat஺ghHᦻIN.DATi-jkᦻᦻlᐭᑮ5Qmᦪ'xx(+ᑴᦪStrCharJR(),ᐸᦪḄ/012=noᓫ#5Qmᡠᨵ5QḄASCII7rs4ᯠN#rsNḄ5QASCII7uv6@5QḄASCH7wᑮxḄ5Qyᐭ@5Qmz{Ḅ|6஺ᨬN#ᜐᳮḄ5Qmyᢥnxᐭ5Qmᦪ'xxᨬN!ᵨᦪwriteDat஺#OPxxSEᑮᦻOUT8.DAT஺@ᦪᦻḄ12nḄᙳ89805Q᪗Q஺VᑖXYLᙠᦻprogl.c஺(_ᦋa:ᦪmain஺ஹᦪᦪReadDat஺SEᦪᦪwriteDat஺Ḅᑁ஺#include#include#includecharxx[50][80];intmaxline=0;/*ᦻlḄnᦪ*/intReadDat(void);

63voidWriteDat(void);voidStrCharJR(){inti,j;for(i=0;i

64\007n);return;)StrCharJR();WriteDat();)intReadDat(void)(FILE*fp;inti=0;char*p;if((fp=fopen("IN.DAT","rn))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i]An*)if(p)*p=O;i++;)maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;clrscr();fp=fopen("OUT8.DATV'wu);for(i=0;i

65printf("%s

66",xx[ij);fprintf(fp,"%s

67",xx[i]);)fclose(fp);)ਮ⚪17ᦪREADDAT()ghHᦻIN.DATi-jkᦻᦻlᐭᑮ5Qmᦪ'XX;(+ᑴᦪCHA(),ᐸᦪ/01noᓫ#5QmḄ-5QḄASCII7v5QḄASCH7wᑮ-5Q5QḄASCH7v5QḄASCH7,wᑮx5QF-ᜐᳮᑮᨬN5QᨬN-5QḄASCII7v@-5QḄASCII7wᑮᨬN-xḄ5QwᑮḄx5Qᑖ¡ᙠ@5Qmz{Ḅ|6஺ᨬN#ᜐᳮḄ5Qm⌮£Nᢥnxᐭ5Qmᦪ'XX,ᨬN!ᵨᦪWRITEDATO#OPXXSEᑮᦻ0UT9.DAT.@ᦪᦻḄ1:nḄᙳ89805Q᪗Q.TU2VᑖXYL¥E஺(_ᦋaᦪmain஺ஹᦪᦪReadDat஺SEᦪᦪwriteDat஺Ḅᑁ஺#include#include#includecharxx[50][80];intmaxline=0;/*ᦻlḄnᦪ*/intReadDat(void);voidWriteDat(void);voidChA(void){inti,j;charch;for(i=0;i

68printf("ᦪᦻIN.DAT0ᡭ!

69\007”);return;)ChA();WriteDat();)intReadDal(void)(FILE*fp;inti=0;char*p;if((fp=fopenCIN.DAT",nrn))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],'

70');if(p)*p=0;i++)maxline=i;fclose(fp);return0;)voidWriteDat(void){FILE*fp;inti;clrscr();fp=fopen("OUT9.DAT““w“);for(i=0;i

71*',xx[i]);fprintf(fp,n%s

72",xx[i]);)fclose(fp);ਮ⚪18ᦪReadDat஺ghHᦻENGINi-jkᦻᦻlᐭᑮ5Qmᦪ'xx(+ᑴᦪencryptChar(),ᢥ¥[Ḅ¦§ᐵ©zᦪ'xxḄᡠᨵ5Qªn¦§yᐭᦪ'xxḄz{Ḅ|6ᨬN!ᵨᦪWriteDat஺#OPxxSEᑮᦻPS10.DAT஺

73¦§ᐵ©2f(p)=p*llmod256(p1ᦪ'«-5QḄASCH7f(p)1D¬Nx5QḄASCII7)᝞P@5QḄASCII71ᏔᦪᡈD¬Nf(p)789:932,ᑣ¯5Q],ᔲᑣ±f(p)ᡠz{Ḅ5Qªn¦§஺VᑖXYLᙠᦻprogl.c஺@ᦪᦻḄ12nḄᙳ89805Q஺(_ᦋaᦪmain஺ஹᦪᦪReadDat஺SEᦪᦪWriteDat()Ḅᑁ஺#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*ᦻlḄnᦪ*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j;for(i=0;i

74\007");return;)encryptChar();WriteDat();intReadDat(void)1FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("eng.in","r,'))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){

75p=strchr(xx[ij,,

76,);if(p)*p=O;i++maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;fp=fopen("ps10.dat",W);for(i=0;i

77”,xx[i]);fprintf(fp,n%s

78H,xx[i]);)fclose(fp);ਮ⚪19+ᑏ-ᦪfindStr(char*str,char*substr),¯ᦪCD-³o2Ḅ´5Qmᙠµ-5QmEhḄ¶ᦪ஺·᝞Ꮇ[SᐭḄ5Qmo”asdasasdfgasdaszx67asdmklo",´5Qmo“as”ᦪº»716஺ᦪReadWrite஺ghHᦻin.dati¼5Qm!ᵨᦪfindStr(),ᨬN#OPSEᑮᦻout.dat஺TU2VᑖXYLᙠᦻprogl.c஺(_ᦋaᦪmain()ᐸ½ᦪḄbcᑁ¾ᙠᦪfindStr()Ḅ¿ÀÁᐭÂ+ᑏḄ3ÃÄÅ஺#include#include#includeintfindStr(char*str,char*substr){inti,j,lenl,len2,cnt=0Jlag;lenl=strlen(str);len2=strlen(substr);for(i=0;i

79if(flag==1)cnt++;)returnent;main()charstr[81],substr[3];intn;clrscr();printf("Sᐭ@5Qmgets(str);printf("Sᐭ´5Qm:");gets(substr);puts(str);puts(substr);n=findStr(str,substr);printf(,'n=%d

80n,n);ReadWrite();IReadWrite()charstr[81],substr[3],ch;intn,len,i=0;FILE*rf,*wf;rf=fopen(nin.datH,"r");wf=fopen("out.dat'\Mwn);while(i<25){fgets(str,80,rf);fgets(substr,10,rf)len=strlen(substr)-1;ch=substrflen];if(ch==*

81'IIch==Oxla)substr[len]=0;n=findStr(str,substr);fprintf(wf,H%d

82",n);i++)fclose(rf);fclose(wf);

83ਭ⚪20+ᑏᦪjsValue,½Ḅ/012ÆFibonacciᦪᑡᜧ9tḄᨬ8Ḅ-ᦪOPᵫᦪº»஺ᐸFibonacciᦪᑡF(n)Ḅ[\o2F(0)=0,F(l)=lF(n)=F(n-l)+F(n-2)ᨬN!ᵨᦪwriteDal஺i50ᦪ3ᑖ¡wEOP?#OPSEᑮᦻoul.dat஺·᝞2Ét=1000Êᦪ7o21597஺VᑖXYLᙠᦻprogl.c஺(_ᦋaᦪmain஺ᑏᦪwriteDat஺Ḅᑁ஺#includeintjsValue(intt){intfO=O,fl=l,fn;fn=fO+fl;while(fn<=t){fO=fl;fl=fn;fn=fO+fl;)returnfn;main()(intn;n=1000;printf("n=%d,f=%d

84'

85,jsValue(n));writeDat();)writeDat()(FILE*in,*out;inti,n,s;in=fopen(uin.dat",,"r");out=fopen(',out.dat,\,,wu);for(i=0;i<50;i++){fscanf(in,u%dn,&n);s=jsValue(n);printf(,,%d

86",s);

87fprintf(out,n%d

88n,s);)fclose(in);fclose(out);)ਮ⚪21ËᑡYLprogl.cḄ/012ᑭᵨ=ËᡠÍḄÎᓫϧÐÑÆÐY2cos(x)-x=0Ḅ-g᪷஺Xn+l=cos(Xn)ϧÓÔ᝞Ë2পiXIÖ7o0.0(2)X0=X1,#X1Ḅ7×¥X0(3)Xl=cos(X0),ÆE-xḄXI(4)3X0-X1ḄØz7890.000001,᡻nÓÔ(5),ᔲᑣ᡻nÓÔ(2)(5)ᡠÆXIÚ1ÐYcos(X)-X=0Ḅg᪷Ûoᦪ7º»஺(+ᑏᦪcountValue஺ghYLḄ⌕ÆᨬN!ᵨᦪwriteDat஺#OPSEᑮᦻOUT17.DAT஺VᑖXYL¥E஺(_ᦋaᦪmain஺SEᦪᦪwriteDat஺Ḅᑁ஺#include#include#includefloatcountValue(){floatx0,x1;x1=0.0;do{x0=xl;xl=cos(x0);}while(fabs(x0-xl)>=0.000001);returnx1;Imain()(clrscr();printf("g᪷=%&",countValue஺);printf(',%f

89',,cos(countValue())-countValue());writeDat();writeDatO

90FILE*wf;wf=fopen("OUT17.DAT"'wu);fprintf(wf,"²f

91”,countValue());fclose(wf);)ਭ⚪22(+ᑏᦪcountValueO,½Ḅ/012Æn=ᑁ(ᒹÀn)áÊ0â3ã7᦮◀ḄᡠᨵæᯠᦪçḄèÐ᪷s,Ûoᦪ7º»ᨬNOPsSEᑮᦻoutdat஺·᝞3no1000Êᦪ7{o2s=153.909064஺VᑖXYLᙠᦻprogl.c஺(_ᦋaᦪmain()SᐭSEᦪᦪprogReadWrite஺Ḅᑁ஺#include#include#includedoublecountValue(intn){inti;doubles=0.0;for(i=l;i

92",countValue(1000));progReadWrite();)progReadWrite()(FILE*fp,*wf;inti,n;floats;fp=fopen("in.dat,',,,rn);if(fp==NULL){

93printf("ᦪᦻin.datᙠ!)return;)wf=fopen(nout.dat","w");for(i=0;i<10;i++){fscanf(fp,"%d

94u,&n);s=countValue(n);fprintf(wf,M%f

95H,s);)fclose(fp);fclose(wf);⚪23ᙠᦻin.datᨵN(ᦪ<200)gᦪᦪreaddat஺i$Ngᦪᐭᦪ'xx஺(+ᑴᦪcalvalue஺ᐸ/0⌕Æ21ஹÆE$NgᦪḄèᙳ7aver2ஹᑖ¡ÆE$NgᦪḄ᦮ᦪVᑖçsumint=>8ᦪVᑖçsumdec,ᨬN!ᵨᦪwritedat()#ᡠÆḄOPSEᑮᦻout.dat஺TU2VᑖXYL¥E஺(_ᦋaᦪmain஺ஹᦪᦪreaddat஺SEᦪᦪwritedat஺Ḅᑁ஺#include#include#defineMAXNUM200floatxx[MAXNUM];intN=0;/*ᦻIN.DATᐳᨵêëgᦪ*/doubleaver=0.0;/*èᙳ7*/doublesumint=0.0;/*᦮ᦪVᑖç*/doublesumdec=0.0;/*8ᦪVᑖç*/intReadDat(void);voidWriteDat(void);voidCalValue(void){inti;for(i=0;i

96aver/=N;voidmain(){inti;clrscr();for(i=0;i

97");return;)Calvalue();printf("ᦻIN.DATᐳᨵgᦪ%d

98”,N);printf("èᙳ7=%.21f

99”,aver);printf("᦮ᦪVᑖç=%.21f

100”,sumint);printf("8ᦪVᑖç%.21f

101",sumdec);WriteDat();system(Hpausen);)intReadDat(void)(FILE*fp;inti=0;if<(fp=fopen("in.datn,'7"))==NULL)return1;while(!feof(fp)){fscanf(fp,n%d,",&xx[i++]);}fclose(fp);return0;)voidWriteDat(void)(FILE*fp;fp=fopen("OUT.DAT",“w”);fprintf(fp,,,%.21f

102%.21f

103%.21f

104n,aver,sumint,sumdec);fclose(fp);

105⚪24ËᑡYLprogl.cḄ/012ᙠ᦮ᦪ(100ö999)øùQᔠᩩḄ᦮ᦪ¶H8ᑮᜧᐭᦪ'½ú1ûᐰèÐᦪý1¼ᦪ5þá·᝞144ஹ676஺ᑴᦪᩩḄ᦮ᦪḄᦪᡠᑴḄᦪ஺ᨬᵨᦪwriteDat஺'()*+ᑮᦻout.dat2஺3ᦋ56ᦪmain஺9ᑏᦪwriteDat஺Ḅᑁ<஺#includeintjsValue(intbb[J){inti,j,k=O;inthun,ten,data;for(i=10;i<32;i++)hum=j/100;ten=j%100/10;data=j%10;if(hum==tenllhum==datallten==data)bb[k++]=j;}returnk;main()(intb[20],num;num=jsValue(b);writeDat(num,b);)writeDat(intnum,intbf])(FILE*out;inti;out=fopen(,'out.dat,,,,'w");printf(,'%d

106,

107um);fprintf(out,n%d

108",num);for(i=0;i

109ᦪ஺ᡠᦻᦪtᢣᐸᔜᦪḄ᦮ᦪ᝞121,676,94249஺ᩩḄᦪ᝞m=ll,m2=121,m3=l331Ḇᦻᦪ஺ᑴᦪintsvalue(k>ngm),᝞)tᦻᦪᑣᦪ1,{ᑣ0஺ᨬ'()*+ᑮᦻ஺ut.dat2஺uᑖrs+஺3ᦋ56ᦪmain஺Ḅᑁ<஺#includeintjsValue(longn){inti,strl,half;charxy[20];ltoa(n,xy,10);strl=strlen(xy);half=strl/2;for(i=0;i=half)return1;elsereturn0;)main(){longm;FILE*out;out=fopen(,'out.dat",,'wu);for(m=ll;m<1000;m++){if(jsValue(m)&&jsValue(m*m)&&jsValue(m*m*m)){printf("m=%41d,m*m=%61d,m*m*m=%81d

110”,m,m*m,m*m*m);fprintf(out,"m=%41d,m*m=%61d,m*m*m=%81d)}fclose(out);system("pausen);ਭਮ⚪n26ᙠᦻIN.DAT2ᨵ(ᦪ200)ᦪḄ᦮ᦪᦪReadDat()¡¢£᦮ᦪxᐭᦪ¥xx2஺ᑴᦪCalValue஺ᐸ⌕§u1ஹ§+£ᦻ2ᐳᨵª«᦮ᦪtotNumk2ஹ§£¬ᦪ1®¯Ḅ°ᦪtᏔᦪḄᦪḄᦪtotCnt,²³ᩩḄ£¬ᦪ(´Ḅµ)Ḅ¶·¸ᙳµtotPjz,ᨬᵨᦪwriteDat஺'ᡠ§Ḅ()*+ᑮᦻOUT.DAT2஺ᑖrsᙠᦻprogl.c2஺3ᦋ56ᦪmain஺ஹ¡ᦪReadDat()9ᑏᦪwriteDat஺Ḅᑁ<஺#include

111#include#defineMAXNUM200intxx[MAXNUM];inttotNum=0;/*ᦻIN.DAT2ᐳᨵª«᦮ᦪ*/inttotCnt=0;/*¹ᔠᩩḄ᦮ᦪḄᦪ*/doubletotPjz=0.0;/*¸ᙳµ*/intReadDat(void);voidwriteDat(void);voidCalValue(void){inti,data;for(i=0;i0){totNum++;data=xxlij»l;if(data%2==0){totCnt4-+;totPjz+=xx[i];})if(totCnt==0)totPjz=0;elsetotPjz/=totCnt;)voidmain()(inti;clrscr();for(i=0;iif(ReadDat()){printf("ᦪ»ᦻIN.DAT¼ᡭ¾!\007

112")kreturn;)CalValue();printf("ᦻIN.DAT2ᐳᨵ᦮ᦪ=%d

113",totNum);printf("¹ᔠᩩḄ᦮ᦪḄᦪ=%d

114",totCnt);printf("¸ᙳµ=%.2f

115",totPjz);writeDat();)intReadDat(void)FILE*fp;inti=0;

116if((fp=fopen(HIN.DATn,MrH))==NULL)return1;while(!feof(fp)){fscanf(fp/'%d,",&xxli+4-J);)fclose(fp);return0;)voidwriteDat(void)(FILE*fp;fp=fopen(nOUT.DATn,nwn);fprintf(fp,,,%d

117%d

118%6.2f

119",totNum,totCnt,totPjz);fclose(fp);)⚪n27Àᦪ»ᦻin.dat2ᨵ300ᦪxᵨ¡ᦪReadDat஺'£¬ᦪᐭᦪ¥a2ᑴ-ᦪjsValue஺ᐸtu§+ᓟᦪḄᦪÃÄᦪḄᦪÃᓝᦪᓃḄᦪÃᦪḄᦪᜧÈÉḄᦪent,Ê'ᡠᨵᩩḄᦪËÌᐭᦪ¥b2ᯠᦪ¥bḄᦪᢥÏÐᑮᜧḄÑsÒÓ᣸sᨬᵨᑏᦪwriteDat஺'()*+ᑮout.datᦻ஺᝞u9123,9-123>0,ᑣᦪᩩᐭᦪ¥b2,Õᦪcnt=cnt+l஺9812,9-8-1-2>0,ᑣᦪ¼ᩩÖᶍ஺ᑖrsᙠᦻprogl.c2஺rs2ØÙᦪ¥ua[300],b[300],ØÙÚÛuent3ᦋ56ᦪmain஺ஹ¡ᦪReadDat஺9ᑏᦪwriteDat஺Ḅᑁ<஺#includeinta[300],b[300],cnt=0;jsValue(){inti,j,qw,bw,sw,gw;for(i=0;i<300;i++){qw=a[i]/1000;bw=a[i]/100%10;sw=a[i]%100/10;gw=a[i]%10;if(qw-bw-sw-gw>0)b[cnt++]=a[i];)for(i=0;ib[j]){qw=b[i];bfi]=b[j];b[j]=qw;}main()

120inti;readDat();jsValue();writeDat();printf(ncnt=%d

121u,cnt);for(i=0;i)readDat()(FILE*fp;inti;fp=fopen("in.dat'

122rn);for(i=0;i<300;i+4-)fscanf(fp,n%d,'\&ali]);fclose(fp);)writeDat()(FILE*fp;inti;fp=fopen(',out.datV'wn);fprintf(fp,H%d

123",cnt);for(i=0;i=0Õab-cd<=10Õãᦪᙳt᜻ᦪæçã°ᦪḄᓝᦪᙳ¼ÉᑣèᩩḄᦪᢥÏᜧᑮÐḄÑsᐭᦪ¥b2x⌕é¶ᩩḄᦪḄᦪcntoᨬmain஺ᦪᵨᑏᦪwriteDat()'()ent²³ᦪ¥b2¹ᔠᩩḄᦪ*+ᑮOUT.DATᦻ2஺uᑖrsᙠᦻprogl.c2஺rs2ØÙᦪ¥:a[200],b[200],ØÙÚÛuent3ᦋ5ᦪ»ᦻIN.DAT2Ḅëìᦪ»ஹ6ᦪmain()>¡ᦪreadDat()9ᑏᦪwriteDat()Ḅᑁ<஺

124#include#defineMAX200intalMAXJ,b[MAX],ent=0;voidjsValQ{inti,j,thou,hun,ten,data,ab,cd;for(i=0;i<200;i+4-){thou=a[i]/1000;hun=a[i]%1000/100;ten=a[i]%100/10;data=a[i]%10;ab=10*thou+len;cd=10*data+hun;if((ab-cd)>=0&&(ab-cd)<=10&&ab%2==I&&cd%2==1&&ab>=10&&cd>=10)b[cnt++]=a[i];)for(i=0;i

125”,ent);for(i=0;i

126'');writeDat();)writeDat()(FILE*fp;inti;fp=fopenC'out.dat","w11);fprintf(fp,,,%d

1271',ent);for(i=0;i

128'\b[i]);

129fclose(fp);ਮ⚪n29ᦪ»ᦻIN.DAT2ᨵ200ᦪxᵨ¡ᦪreadDat஺'£¬ᦪᐭᦪ¥a2ὃ¯ᑴÝᦪjsVal(),ᐸtu'ᓟᦪ9ᓝᦪÞ°¥ᡂÝ°Ḅᓝᦪab(°äᦪḄᓝᦪtàᦪḄᓟᦪ°äᦪḄᦪtàᦪḄᓝᦪ)²³'ᦪ9Äᦪ¥ᡂáÝ°Ḅᓝᦪcd(°ᓝᦪḄᓝᦪtàᦪḄᦪ°ᓝᦪḄᦪtàᦪḄÄᦪ)᝞)°¥ᡂḄãäᦪab-cd>=10Õab-cd<=20ÕãᦪᙳtᏔᦪæçã°ᦪḄᓝᦪᙳ¼ÉᑣèᩩḄᦪᢥÏᜧᑮÐḄÑsᐭᦪ¥b2x⌕é¶ᩩḄᦪḄᦪcntoᨬmain஺ᦪᵨᑏᦪwEeDal()'()ent²³ᦪ¥b2¹ᔠᩩḄᦪ*+ᑮOUT.DATᦻ2஺uᑖrsᙠᦻprogl.c2஺rs2ØÙᦪ¥:a[200],b[200],ØÙÚÛuent3ᦋ5ᦪ»ᦻIN.DAT2Ḅëìᦪ»ஹ6ᦪmain஺ஹ¡ᦪreadDat஺9ᑏᦪwriteDat()Ḅᑁ<஺#include#defineMAX200inta[MAXl,b[MAX],ent=0;voidjsVaK){inti,j,qw,bw,sw,gw,ab,cd;for(i=0;i=10&&ab-cd<=20&&ab%2==0&&cd%2==0&&qw!=0&&gw!=0)b[cnt++]=a[i];)for(i=0;i

130voidmain()(inti;readDat();jsVal();printf("ᩩḄᦪ=%d

131”,ent);for(i=0;i

132");writeDat();)writeDatO(HLE*fp;inti;fp=fopen("out.dat",nwu);fprintf(fp,,'%d

133,',ent);for(i=0;i

134",bfil);fclose(fp);ਮ⚪n30ᦪ»ᦻIN.DAT2ᨵ200ᦪxᵨ¡ᦪreadDat஺'£¬ᦪᐭᦪ¥a2ὃ¯ᑴÝᦪjsVal(),ᐸtuËÌÏᦪ¥a2¢+Ýᦪ᝞)ᦪíîÐÈᦪ²ḄïᦪÕᦪtᏔᦪ(ᦪ²¼ïᦪᑣ¼ðé),ᑣðé+ᩩḄᦪentx'£¬ᦪᢥÏÐᑮᜧḄÑsᐭᦪ¥b2ᨬᵨᑏᦪwriteDat()'()ent²³ᦪ¥b2¹ᔠᩩḄᦪ*+ᑮOUT.DATᦻ2஺uᑖrsᙠᦻprogl.c2஺rs2ØÙᦪ¥:a[200],b[200],ØÙÚÛuent3ᦋ5ᦪ»ᦻIN.DAT2Ḅëìᦪ»ஹ6ᦪmain஺ஹ¡ᦪreadDal஺9ᑏᦪwriteDat()Ḅᑁ<஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsVal(){intij,flag;for(i=0;i

135for(i=0;ib[j]){flag=b[i];b[i]=b|j];b[j]=flag;}voidreadDat()(inti;FILE*fp;fp=fopen("in.datn,nrn);for(i=0;i

136”,ent);for(i=0;i

137");writeDat();writeDat()(FILE*fp;inti;fp=fopen("out.dat",nwu);fprintf(fp,"%d

138",ent);for(i=0;i

139u,bfi]);fclose(fp);)ਮ⚪n31ᙠᦻIN.DAT2ᨵ100®ò├ôõö÷®ò├ôõöᵫ®òùṹdm(¹û4)®òüme(¹û10)ᓫþdj(᦮û)ᦪÛsi(᦮û)ÿje(᦮)ᑖᡂ஺ᐸ=ᓫ*ᦪ஺ᦪReadDat஺100├!"#$%ᐭ'᪀ᦪsell஺)*ᑴᦪSortDatO,ᐸ,-⌕/ᢥ1ᜧᑮ456᣸ᑡ9:;<9ᑣᢥ>?@ṹ1ᜧᑮ456᣸ᑡ9ᨬC᣸ᑡ'DE%ᐭ'᪀ᦪsell9ᨬFGᵨᦪWriteDatOI'DJᑮᦻLOUT4.DAT஺ᑖMNO%ᙠᦻLprogl.c஺)QᦋSTᦪmain஺ஹᦪVᦪReadDat஺WJᦪVᦪWriteDat஺ḄᑁZ஺

140#include#include#include#include#include#defineMAX100typedefstruct)chardm[5[;/*>?@ṹ*/charmc[ll];/*>?]^*/intdj;/*ᓫ*/intsi;/*ᦪ*/longje;/**/}PRO;PROselllMAXJ;voidReadDat();voidWriteDat();voidSortDat(){intij;PROxy;for(i=0;i<99;i++)for(j=i+1;j<100;j++)if(sell[i].je<0){xy=sell[i];sell[i]=sellfj];sell[j]=xy;}voidmain()(memset(sell,0,sizeof(sell));ReadDat();SortDat();WriteDat();voidReadDat()(FILE*fp;charstr[80],ch[ll];inti;fp=fopen("IN.DATn_'r");for(i=0;i

141memcpy(sell[i].mc,str+4,10);memcpy(ch,str+l4,4)_ch[4]=0;sell[i].dj=atoi(ch);memcpy(ch,str+18,5);ch[5]=0;sell[i].sl=atoi(ch);sell[i].je=(long)sell[i].dj*sell[i].sl;)fclose(fp);)voidWriteDat(void)(FILE*fp;inti;fp=fopen(nOUT4.DATu_'wu);for(i=0;i

142",sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,seU[i].je);fprintf(fp,H%s%s%4d%5d%5d

143",sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);)fclose(fp);ਮ⚪b32cdᙠᦻLIN.DAT%ᨵ100>?├!"#9f>?├!"#ᵫ>?@ṹdmhij4kl9>?]^mehij10kl9ᓫdjh᦮l9ᦪsih᦮l9jeh᦮lᑖᡂ஺ᐸ=ᓫ*ᦪ஺ᦪReadDat100├!"#$%ᐭ'᪀ᦪsell஺)*ᑴᦪSortDat஺9ᐸ,-⌕/ᢥ>?]^1ᜧᑮ456᣸ᑡ9:>?]^;m9ᑣᢥ14ᑮᜧ56᣸ᑡ9ᨬC᣸ᑡ'DE%ᐭ'᪀ᦪsellᨬFGᵨᦪWriteDat஺I'DJᑮᦻLOUT7.DAT஺ᑖMNO%ᙠᦻLprogl.c஺)QᦋSTᦪmain஺ஹᦪVᦪReadDat஺WJᦪVᦪWriteDat஺ḄᑁZ஺#include#include#include#include#include#defineMAX100typedefstruct{chardm[5];/*>?noṹ*/char>?]^p

144intdj;/*ᓫ*/intsi;/*ᦪqlongje;/**/}PRO;PROselllMAXJ;voidReadDat();voidWriteDat();voidSortDat(){inti,j;PROxy;for(i=0;i<99;i++)for(j=i+l;j<100;j++)if(strcmp(sell[i].mc,sell[j].mc)sell[j].je){xy=sell[i];sell[i]=sell[j];sell[j]=xy;}}voidmain()(memset(sell,0,sizeof(sell));ReadDat();SortDat();WriteDat();}voidReadDat()(FILE*fp;charstr[8O],ch[ll];inti;fp=fopen(nIN.DAT9V,rn);for(i=0;i<100;i++){fgets(str,8O,fp);memcpy(sell[i].dm,str,4)_memcpy(sell[i].mc,str+4,10);memcpy(ch,str+14,4)_ch[4]=0;sell[i].dj=atoi(ch);memcpy(ch,str+18,5);ch[5]=0;sell[i].sl=atoi(ch);sell[i].je=(long)sell[i].dj*sell[i].sl;)fclose(fp);

145voidWriteDat()FILE*fp;inti;fp=fopen("OUT7.DAT",“w")_for(i=0;i<100;i++){printf(H%s%s%4d%5d%5d

146M,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);fprintf(fp,”rs%s%4d%5d%5d

147",sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);)fclose(fp);)ਭਮ⚪b33)*ᑴᦪReadDat஺tu1ᦻLIN.DAT1000ᓝ5ᑴ᦮ᦪᑮᦪxx_)*ᑴᦪCompute஺ᑖwxxᏔᦪḄᦪeven,᜻ᦪḄzᙳ|avel,ᏔᦪḄzᙳ|ave2}~totfcḄ|9ᨬFGᵨᦪWriteDat()I'DJᑮOUT.DATᦻL஺Ḅ᝞N2totfc=l/NE(xx[i]-ave2)i=lNqᏔᦪḄᦪ9xx[i]qᏔᦪ9ave2qᏔᦪḄzᙳ|஺ᦪVᦻL%Ḅf6%10ᦪ9$ᵨ⌹p◞஺(fᦪᙳᜧ஺4m2000)ᑖMNO%ᙠᦻLprogl.c஺)QᦋSTᦪmain஺WJᦪVᦪwriteDat஺ḄᑁZ஺#include#include#include#defineMAX1000intxx[MAX],odd=0,even=0;doubleave1=0.0,ave2=0.0,totfc=0.0;voidWriteDat(void);intReadDat(void){inti;FILE*fp;if((fp=fopen(,,IN.DAT,,_,r"))==NULL)return1;

148for(i=0;i

149n);}fclose(fp);return0;)voidCompute(void){inti,yy[MAX];for(i=0;i

150”)_return;)Compute();printf(',OVEN=%d

151AVEl=%f

152AVER2=%f

153TOTFC=%f

154,,,even,avel,ave2,totfc);WriteDat();)voidWriteDat(void)(FILE*fp;inti;

155fp=fopen(',OUT.DATn,,,wn);fprintf(fp,',%d

156%f

157%f

158%f

159,',even,ave1,ave2,totfc);fclose(fp);⚪b34id102⚪/ᦪisPrime஺ᦪNOprogl.cḄ,-⌱100}1000ᑁᡠᨵkᦪiᓝkᦪiW10◀ᡠᦪា¢kᦪiḄᦪ(᝞293)o$J£¤ᦪḄᦪent}~¤ᦪ|ḄWsum஺)ὃ¦*ᑏᦪcountValue()tuNO⌕/9ᨬFGᵨᦪwriteDAT()I'DentWsumJᑮᦻLbclO.out஺¨©ᑖMNO%ᙠᦻLprogl.c஺)QᦋSTᦪmain()WJᦪVᦪwriteDAT஺ḄᑁZ஺#includeintent,sum;intisPrime(intm)(inti;for(i=2;i

160”,ent);printf("ª«ᩩLᦪ|ḄW%d”,sum);writeDAT();

161writeDAT()(FILE*fp;fp=fopenC'bclO.out1',"wn);fprintf(fp,"%d

162%d

163",ent,sum);fclose(fp);)ਭ⚪b35¯°ᦪḄ±²⚗Al=l,A2=l,}Fᔜ⚗ᐹᨵ᝞ᐵ·An=An-2+2An-l(¨n-2n-Iq᪗)¹ᑡNOprogl.cḄ,-⌕/º»¼᦮ᦪM=100,1000W10000/¼½Ḅn|9¾ᐸª«Sn=M,¿Sn=Al+A2+...+An,$º»In|%ᐭᦪᓫᐗb[0],b[l]Wbফ9)*ᑴjsValue஺ᦪᩭtuÃ,-9ᨬFGᵨᦪwriteDat஺Iᦪb□Ḅ|Jᑮout.datᦻL஺)QᦋSTᦪmain஺WᑏᦪwriteDat஺ḄᑁZ஺#includeintb[3];jsValue(){inta1=1,a2=1,a12,sn,k=2;sn=al+a2;while(l){al2=al+2*a2;if(sn<100&&sn+a12>=100)b[O]=k;if(sn<1000&&sn+a12>=1000)b[l]=k;if(sn=10000){b[2]=k;break;}sn=sn+a12;al=a2;a2=al2;k++;main(){jsValue();printf(,,M=100,n=%d

164M=1000,n=%d

165M=10000,n=%d

166',,b[0],b[l],b[2]);writeDat();writeDat()

167FILE*fp;fp=fopen("out.dat",“w")_printfC9%d

168%d

169%d

170",b[0],b[l],b[2]);fprintf(fp,n%d

171%d

172%d

173°,b[0],b[l],b[2]);fclose(fp);ਭ⚪b36ᦪReadDat஺tu1ᦻLENGINÅÆÇᦻᦻÈ9%ᐭᑮijÉᦪxx_)*ᑴᦪencryptChar(),ᢥÊËḄÌ@ᐵ·¼ᦪxxḄᡠᨵij56Ì@9E%ᐭᦪxxḄ¼½ḄkÍ9ᨬFGᵨᦪWriteDat஺I'DxxJᑮᦻLpS6.DAT஺Ì@ᐵ·f(p)=p*llmod256(pᦪ¯ÅijḄASCII|9f(p)FÎijḄASCII|)9᝞DFf(p)|4m32ᡈf(p)¼½Ḅijᦪi஺Ð9,ᑣÑijÒ9ᔲᑣÔf(p)ᡠ¼½Ḅij56Ì@஺ᑖMNO%ᙠᦻLprogl.c஺ᦪVᦻL%Ḅf6ḄÕÖᙳ480ij஺)QᦋSTᦪmain஺ஹᦪVᦪReadDat()WJᦪVᦪWriteDat஺ḄᑁZ஺#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*ᦻÈḄ×6ᦪ*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j;for(i=0;i='0'&&xx[iØ*11%256V=9)continue;elsexx[i][j]=xx[i][j]*11%256;)voidmain()clrscr();

174if(ReadDat()){printf("ᦪVᦻLENGIN-ᡭÙ

175\007");return;)encryptChar();WriteDat();)intReadDat(void)(FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("eng.inn,nru))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i]An*);if(p)*p=O;i++_)maxline=i;fclose(fp);return0;}voidWriteDat(void)(FILE*fp;inti;fp=fopen("ps6.datM,uwM);for(i=0;i

176,',xx[i]);fprintf(fpÚrs

177“,xx[iD_)fclose(fp);⚪b37ᦪReadDat஺tu1ᦻLENGINÅÆÇᦻᦻÈ9%ᐭᑮijÉᦪxx_)*ᑴᦪencryptChar(),ᢥÊËḄÌ@ᐵ·¼ᦪxxḄᡠᨵij56Ì@9E%ᐭᦪxxḄ¼½ḄkÍ9ᨬFGᵨᦪWriteDat஺I'DxxJᑮᦻLPS7.DAT஺

178Ì@ᐵ·f(p)=p*llmod256(pᦪ¯ÅijḄASCH|9f(p)FÎijḄASCII|)9᝞DijᜧᑏiÛᡈFf(p)|4m32,ᑣÑijÒ9ᔲᑣÔf(p)ᡠ¼½Ḅij56Ì@஺ᑖMNO%ᙠᦻLprogl.c஺ᦪVᦻL%Ḅf6ḄÕÖᙳ480ij஺)QᦋSTᦪmain஺ஹᦪVᦪReadDat஺WJᦪVᦪWriteDat஺ḄᑁZ஺#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*ᦻÈḄ×6ᦪ*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j;for(i=0;i='A,&&xx[i][j]<='Z')continue;elsexx[i][j]=xx[i][j]*11%256;voidmain()(clrscr();if(ReadDat()){printf("ᦪVᦻLENGIN-ᡭ!

179\007");return;)encryptChar();WriteDatO;intReadDat(void)1FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("eng.inH,Mru))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){

180p=strchr(xx[i]An*);if(p)*p=O;i++_)maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;fp=fopen(Mps7.dat",uw");for(i=0;i

181,',xx[ij);fprintf(fp,n%s

182n,xx[i]);)fclose(fp);⚪b38cdᙠᦻLIN.DAT%ᨵ100>?├!"#9f>?├!"#ᵫ>?@ṹdmhij4kl9>?]^mehij10kl9ᓫdjh᦮l9ᦪsih᦮l9jeh᦮lᑖᡂ஺ᐸ=ᓫ*ᦪ஺ᦪReadDat100├!"#$%ᐭ'᪀ᦪsell஺)*ᑴᦪSortDat஺9ᐸ,-⌕/ᢥ>?@ṹ14ᑮᜧ56᣸ᑡ9:>?@ṹ;<9ᑣᢥ14ᑮᜧ56᣸ᑡ9ᨬC᣸ᑡ'DE%ᐭ'᪀ᦪsell9ᨬFGᵨᦪWrileDat஺I'DJᑮᦻLOUT6.DAT஺ᑖMNO%ᙠᦻLprogl.c஺)QᦋSTᦪmain஺ஹᦪVᦪReadDat஺WJᦪVᦪWriteDatḄᑁZ஺#include#include#include#include#include#defineMAX100typedefstruct{chardm[5];>?nÜṹ*/char>?]^p

183intdj;/*ᓫ*/intsi;/*ᦪᑓlongje;/**/}PRO;PROsell[MAX];voidReadDat();voidWriteDat();voidSortDat(){inti,j;PROxy;for(i=0;i<99;i++)for(j=i+l;j<100;j++)if(strcmp(sell[i].dm,sell[j].dm)>Ollstrcmp(sell[i].dm,sell[j].dm)==O&&sell[i].je>sen[j].je){xy=sell[i];sell[i]=sell[j];sell[j]=xy;}}voidmain()(memset(sell,0,sizeof(sell));ReadDat();SortDat();WriteDat();}voidReadDat()(FILE*fp;charstr[8O],ch[l1];inti;fp=fopen(,'IN.DAT","r");for(i=0;i<100;i++){fgets(str,8O,fp);memcpy(sell[i].dm,str,4)_memcpy(sell[i].mc,str+4,10);memcpy(ch,str+14,4)_ch[4]=0;sell[i].dj=atoi(ch);memcpy(ch,str+18,5);ch[5]=0;sell[i].sl=atoi(ch);sell[i].je=(long)sell[i].dj*sell[i].sl;)fclose(fp);

184voidWriteDat(void)FILE*fp;inti;fp=fopen(HOUT6.DAT',_'wn);for(i=0;i<100;i++){printf(H%s%s%4d%5d%5d

185M,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);fprintf(fp,”rs%s%4d%5d%5d

186",sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);)fclose(fp);)ਭਮ⚪b39uᨵÅ10Þ1006Ḅ⌱ἠᦪVᦻLIN.DAT,ᐸᦪV%Ḅfᩩ"#ḄÖᙳq10k9àÅk⊤âà•ÞḄ⌱äå9àk⊤âàÞḄ⌱äå9ºÃæçᑁZᙳqij஺W1,1⊤âÃÞ⌱90⊤âÃÞè⌱9ᐰ⌱ᡈ⌱ᙳqᦔḄ⌱ἠ஺ÊËᦪReadDatOḄ,-I⌱ἠᦪVᐭᑮijÉᦪxx஺)*ᑴᦪCountRs()ᩭëfÞḄ⌱ἠᦪ$Iἠᦪº»%ᐭyyìᑮyy[9]஺I'DyyJᑮᦻLOUT.DAT஺ᑖMNO%ᙠᦻLprogl.c஺)QᦋSTᦪmain஺ஹᦪVᦪReadDat஺WJᦪVᦪwriteDat஺ḄᑁZ஺#includecharxx[100][ll];intyy[10];intReadDat(void);voidWriteDat(void);voidCountRs(void){inti,j,count;for(i=0;i<100;i++){count=0;for(j=0;j<10;j++)if(xx[i]U]==r)count++;if(count==OIlcount==10)continue;for(j=0;j<10;j++)if(xx[i][j]==,r)yy[j]++_

187voidmain()inti;for(i=0;i

188\007u);return;)CountRs();WriteDat();intReadDat(void)(FILE*fp;inti;if((fp=fopen("IN.DAT",,,rM))==NULL)return1;for(i=0;i<100;i++){if(fgets(xx[i],11,fp)==NULL)return1;xx[i][10]=V)';)fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;fp=fopen(,,OUT.DAT',_,w");for(i=0;i<10;i++){fprintf(fp,n%d

189u,yy[i]);printf("àrdÞḄ⌱ἠᦪ=%d

190”,i+l,yy[i])_)fclose(fp);

191ਮ⚪b40cdᙠᦻLIN.DAT%ᨵ:í(ᦪ<200)îkᦪiḄï᦮ᦪ9ᦪReadDat஺:íï᦮ᦪ$%ᐭᦪxx஺)*ᑴᦪCalValue஺9ᐸ,-⌕/1ஹ/ᦻLᐳᨵñòï᦮ᦪtotNum_2ஹ/¤ᦪḄᔜkᦪiWᏔᦪḄᦪḄᦪtotCnt,}~ª«ÃᩩLḄ¤ᦪḄózᙳ|totPjz,ᨬFGᵨᦪwriteDat()Iᡠ/Ḅ'DJᑮᦻLOUT.DAT஺ᑖMNO%ᙠᦻLprogl.c஺)QᦋSTᦪmain஺ஹᦪReadDat஺WᑏᦪwriteDat஺ḄᑁZ஺#include#include#defineMAXNUM200intxx[MAXNUM];inttotNum=0;/*ᦻLIN.DATᐳᨵñòï᦮ᦪ*/inttotCnô0;/*jᔠᩩLḄï᦮ᦪḄᦪ*/doubletotPjz=0.0;/*zᙳ|*/intReadDat(void);voidwriteDat(void);voidCalValue(void){inti,qw,bw,sw,gw;for(i=0;i0){totNum++;qw=xx[i]/1000;bw=xx[i]/100%10;sw=xx[i]%100/10;gw=xx[i]%10;if((qw+bw+sw+gw)%2==0){totCnt++;totPjz+=xx[i];})if(totCnt==0)totPjz=0;elsetotPjz/=totCnt;voidmain()[inti;clrscr();for(i=0;i

192if(ReadDat()){printf("ᦪVᦻLIN.DAT-ᡭ!\007

193")_return;)CalValue();printf("ᦻLIN.DATᐳᨵï᦮ᦪ=%d

194”,totNum);printf("jᔠᩩLḄï᦮ᦪḄᦪ=%d

195”,totCnt);printf("zᙳ|=%.2f

196”,totPjz);writeDat();intReadDat(void)(FILE*fp;inti=0;if((fp=fopen(,,IN.DAT,'_,r"))==NULL)return1;while(!feof(fp)){fscanf(fp/'%d,",&xxli++J);)fclose(fp);return0;}voidwriteDat(void)(FILE*fp;fp=fopen("OUT.DAT"_'wn);fprintf(fp,n%d

197%d

198%6.2f

199u,totNum,totCnt,totPjz);fclose(fp);)ਮ⚪b41ᑡNOprogl.cḄ,-öᯠᦪSIXWNINE,øùª«ḄᩩLSIX+SIX+SIX=NINE+NINEḄᦪent}~ª«ÃᩩLᡠᨵḄSIXNINEḄWSUM஺)*ᑏᦪcountValue()tuNOḄ⌕/9ᨬFGᵨᦪwriteDat஺I'DentWsum,JᑮᦻLOUT15.DAT஺ᐸḄS,LX,N,Eᔜ@⊤Åᓝ5ᑴᦪi஺ᑖMNO%ᙠᦻLprogl.c஺)QᦋSTᦪmain()WJᦪVᦪwriteDat஺ḄᑁZ஺#includeintent,sum;voidcountValue(){ints,i,x,n,e,six,nine;

200for(s=l;s<10;s++)for(i=0;i<10;i++)for(x=0;x<10;x++)for(n=l;n<10;n++)for(e=0;e<10;e++){six=s*100+i*10+x;nine=n*1000+i*100+n*10+e;if(3*six==2*nine){cnt+4-;sum+=six+nine;}))voidmain()(cnt=sum=0;countValue();printf("ª«ᩩLḄᦪ=%d

201”,cnt);printf("ª«ᩩLᡠᨵḄSIXNINEḄW%d

202”,sum);writeDat();)writeDat()(FILE*fp;fp=fopen("OUT15.DAT,',,'wu);fprintf(fp,,,%d

203%d

204",cnt,sum);fclose(fp);)⚪b42cdᙠᦻLIN.DAT%ᨵ100>?├!"#9f>?├!"#ᵫ>?@ṹdm(ij4k)9>?]^me(ij10k)9ᓫdj(᦮)9ᦪsi(᦮)9je(᦮)ᑖᡂ஺ᐸ=ᓫ*ᦪ஺ᦪReadDat()100├!"#$%ᐭ'᪀ᦪsell஺)*ᑴᦪSortDat஺9ᐸ,-⌕/ᢥ>?]^1ᜧᑮ456᣸ᑡ9:>?]^;m9ᑣᢥ1ᜧᑮ456᣸ᑡ9ᨬC᣸ᑡ'DE%ᐭ'᪀ᦪsell9ᨬFGᵨᦪWriteDat()I'DJᑮᦻLOUT5.DAT஺ᑖMNO%ᙠᦻLprogl.c஺)QᦋSTᦪmain஺ஹᦪVᦪReadDat஺WJᦪVᦪWriteDat஺ḄᑁZ஺#include#include#include

205#include#include#defineMAX100typedefstruct{chardm[5];/*>?@ṹ*/char>?]^*/intdj;/*ᓫ*/intsi;/*ᦪ*/longje;/**/}PRO;PROsell[MAX];voidReadDat();voidWriteDat();voidSortDat(){inti,j;PROxy;for(i=0;i<99;i++)for(j=i+1;j<100;j++)if(strcmp(sell[i].mc,sell[j].mc)

206sell[i].dj=atoi(ch);memcpy(ch,str+18,5);ch[5]=0;sell[i].sl=atoi(ch);sell[i].je=(long)sell[i].dj*sell[i].si;)fclose(fp);)voidWriteDat()(FILE*fp;inti;fp=fopen(nOUT5.DATV9wu);for(i=0;i<100;i++){printf(n%s%s%4d%5d%5d

207n,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);fprintf(fp,H%s%s%4d%5d%5d

208M,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);)fclose(fp);)ਭ⚪b43id82⚪(úÔ'Dᢥ“1ᜧᑮ4”᣸O)ᦪReadDat()tu1ᦻLin.dat206ᦪV%ᑮijÉᦪxx(f6ijÉÖᙳ480)஺)*ᑴᦪjsSort஺9ᐸᦪḄ,-}6qᓫk¼ijÉÒḄ᪗q᜻ᦪḄijᢥᐸASCII|14ᑮᜧḄýO56᣸O9᣸OFḄ'DEᢥ6þÎ%ᐭijÉᦪxx9ᨬFGᵨᦪWriteDat஺I'DxxJᑮᦻLout.dat஺ÿ᝞01234567abcdefghᑣᜐᳮahcfedgbᑖᙠᦻprogl.c஺ᦋᦪmain஺ஹᦪᦪReadDat஺!"#ᦪᦪWriteDat()Ḅᑁ&஺#include#include#includecharxx[20][80];voidjsSort(){inti,j,k,strl;charch;for(i=0;i<20;i++){strl=strlen(xx[i]);

209for(j=l;jfor(k=j+2;kif(xx[i][j]>xx[i][k]){ch=xx[i][j];xx[i][j]=xx[i][k];xx[i][k]=ch;}))voidmain()(readDat();jsSort();writeDat();)readDat()(FILE*in;inti=0;char*p;in=fopen(,,in.dat',/'rH);while(i<20&&fgets(xx[i],80,in)!=NULL){p=strchr(xx[i]^n*);if(p)*p=O;i++'}fclose(in);)writeDat()(FILE*out;inti;out=fopen(,,out.dat,,,,'wn);clrscr();for(i=0;i<20;i++){printf(',%s

210,',xx[i]);fprintf(out,n%s

211u,xx[i]);)fclose(out);)

212ਭਮ⚪+44ᦪReadDat஺,-.ᦻin.dat/200ᦪ1ᑮᦪ3xx(5067ᙳ9:80)஺;ᑴᦪjsSort(),ᐸᦪḄ>?@A0BᓫDᢥFGḄᩩI0᣸K᣸ḄLMNᢥ0OPᐭᦪ3xxKᨬSᵨᦪWriteDat()ULMxx"#ᑮᦻout.dat஺ᩩ.VWᑖBXKYZᑖᢥḄASCII[\᣸K᣸YZᑖ]^ZᑖI0_ᣚ஺᝞Ma67B᜻ᦪKᑣᨬVḄcdeᜐᳮKN1ᙠaf஺g᝞012345678abcdhgfe123498765ᑣᜐᳮhgfedcba876594321ᑖᙠᦻprogl.c஺ᦋᦪmain()>ᦪᦪReadDat()!"#ᦪᦪWriteDat஺Ḅᑁ&஺#include#include#includecharxx[20][801;voidjsSort(){inti,j,k,strl,half;chartemp;for(i=0;i<20;i++){strl=strlen(xx[i]);half=strl/2;for(j=0;j=O;j-,k-){temp=xx[i][j];xx[i][j]=xx[i][k];xx[i][k]=temp;}}voidmain()(readDat();jsSort();writeDat();)readDat()

213FILE*in;inti=0;char*p;in=fopen(uin.datu,,Krn);while(i<20&&fgets(xx[i],80,in)!=NULL){p=strchr(xx[i]An');if(p)*p=O;i++')fclose(in);)writeDat(){FILE*out;inti;clrscr();out=fopen("out.dat,',,,w");for(i=0;i<20;i++){printf("%s

214",xx[i]);fprintf(out,"%s

215",xx[i]);)fclose(out);ਭ⚪+45hiᦪᦻIN.DATᨵ200klᦪKmhSᵨᦪreadDat஺Unoᦪᐭᦪ3aKὃq;ᑴWᦪjsVal(),ᐸ>?@rs.ᦪ3a/#WklᦪK᝞Mtlᦪuvᜧ:tlᦪAxḄykᦪztᦪ@Ꮤᦪ(tlᦪAxc|ykᦪKᑣc}~),ᑣ}~#|ᩩḄkᦪentmUnolᦪᢥ.ᜧᑮ9Ḅᐭᦪ3bKᨬSᵨᑏᦪwriteDat()ULMentAᦪ3bᔠᩩḄlᦪ"#ᑮOUT.DATᦻ஺ᑖᙠᦻprogl.c஺hGᦪ3a[200],b[200],hGentᦋᦪᦻIN.DATḄᦪஹᦪmain஺ஹᦪreadDat()!ᑏᦪwriteDat()Ḅᑁ&஺#include#defineMAX200intafMAX],b[MAX],ent=0;

216voidjsVal(){inti,j,flag;for(i=5;ia[jJ&&a[i]%2==0)flag=l;else{flag=O;break;}if(flag==l)b[cnt++]=a[i];)for(i=0;i

217”,ent);for(i=0;i

218");writeDat();writeDat()(FILE*fp;inti;fp=fopen("out.dat","w");fprintf(fp,"%d

219",ent);for(i=0;i

220u,b[i]);fclose(fp);)

221ਮ⚪+46hiᦪᦻIN.DATᨵ200klᦪKmhSᵨᦪreadDat஺Unoᦪᐭᦪ3aKὃq;ᑴWᦪjsVal(),ᐸ>?@rs.ᦪ3a/#WklᦪK᝞Mtlᦪuvᜧ:tlᦪAxḄykᦪztᦪ@᜻ᦪKztᦪ?7᦮◀(tlᦪAxc|ykᦪKᑣc}~)Kᑣ}~#|ᩩḄkᦪentmUnolᦪᢥ.ᜧᑮ9Ḅᐭᦪ3bKᨬSᵨᑏᦪwriteDat()ULMentAᦪ3bᔠᩩḄlᦪ"#ᑮOUT.DATᦻ஺ᑖᙠᦻprogl.c஺hGᦪ3a[200],b[200],hGentᦋᦪᦻIN.DATḄᦪஹᦪmain஺ஹᦪreadDat஺!ᑏᦪwriteDat()Ḅᑁ&஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsValO{inti,j,flag;for(i=5;ia[j]&&a[i]%2&&a[i]%7==0)flag=l;else{flag=O;break;}if(flag==l)b[cnt++]=a[i];)for(i=0;i

222”,ent);for(i=0;i

223n);

224writeDat();writeDat()(FILE*fp;inti;fp=fopen("out.dat",nwu);fprintf(fp,H%d

225",ent);for(i=0;i?⌕¬ᢥ£¤.ᜧᑮ9I0᣸ᑡK®£¤¯°Kᑣᢥṹ.9ᑮᜧI0᣸ᑡKᨬ±᣸ᑡLMNᐭL᪀ᦪ3sellKᨬSᵨᦪWriteDatULM"#ᑮᦻOUT3.DAT஺ᑖᙠᦻprogl.c஺ᦋᦪmain஺ஹᦪᦪReadDat஺!"#ᦪᦪWriteDat஺Ḅᑁ&஺#include#include#include#include#include#defineMAX100typedefstructchardm[5];/*ṹᜮ/charmc[U];/*¡*/intdj;ᓫ¢*/intsi;/*ᦪ*/longje;/*£¤*/}PRO;PROsell[MAX];voidReadDat;voidWriteDat;voidSortDat(){inti,j;

226PROxy;for(i=0;i<99;i++)for(j=i+1;j<100;j++)if(sell[i].jeO){xy=selllij;selllij=sell|jj;sell[j]=xy;}Ivoidmain()(memset(sell,0»sizeof(sell));ReadDat();SortDat();WriteDat();)voidReadDat()FILE*fp;charstr[8O],ch[11];inti;fp=fopen("IN.DAT',,"rn);for(i=0;i

227",sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);fprintf(fp,n%s%s%4d%5d%5d

228H,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);

229fclose(fp);)ਮ⚪+48hiᦪᦻin.datᨵ300klᦪKmhSᵨᦪReadDat஺Unoᦪᐭᦪ3aK;ᑴWᦪjsValue஺Kᐸ>?@¬#ᓟᦪfḄᦪekᦪfḄᦪ°:µᦪfḄᦪeH¶ᦪfḄᦪḄkᦪent,·Uᡠᨵ|ᩩḄlᦪrsᐭᦪ3bKᯠDᦪ3bḄlᦪᢥ.9ᑮᜧḄI0᣸KᨬSᵨᑏᦪwriteDat஺ULM"#ᑮout.datᦻ஺g᝞6712,6+2=7+1,ᑣtᦪ|ᩩᐭᦪ3bKzkᦪcnt=cnt+l஺8129,8+901+2,ᑣtᦪc|ᩩºᶍ஺ᑖᙠᦻprogl.c஺hGᦪ3a[300],b[300],hGentᦋᦪmain஺ஹᦪReadDat()!ᑏᦪwriteDat()Ḅᑁ&஺#includeintal300J,b[300J,cnt=0;jsValue(){inti,qw,bw,sw,gw,j;for(i=0;i<300;i++){qw=a[i]/1000;bw=a[i]%1000/100;sw=a[i]%100/10;gw=a[i]%10;if(qw+gw==bw+sw)bfcnt++]=a[i];)for(i=0;ib[j]){qw=b[i];b[i]=b[j];b[j]=qw;}main(){inti;readDat();jsValue();writeDat();printf("cnt=%d

230",cnt);for(i=0;i}readDat()

231FILE*fp;inti;fp=fopen("in.datH,nr");for(i=0;i<300;i++)fscanf(fp,n%d,M,&a[i]);fclose(fp);)writeDat()(FILE*fp;inti;fp=fopen("out.dat"/'w");fprintf(fp,"%d

232",cnt);for(i=0;i?@¬#ᓟᦪfḄᦪ¼µᦪ¼ᓝᦪfḄᦪ¼kᦪfḄᦪᜧ:¾Ḅkᦪent,·¬#ᡠᨵ|ᩩḄlᦪ¿ᙳ[pjzl,Ac|ᩩḄlᦪ¿ᙳ[pjz2,ᨬSᵨᑏᦪwriteDat஺ULM"#ᑮout.datᦻ஺g᝞9123,9-1-2-3>0,ᑣtᦪ|ᩩ~¨¿ᙳ[pjzl,zkᦪcnt=cnt+lo9812,9-8-12<0,ᑣtᦪc|ᩩ~¨¿ᙳ[pjz2஺ᑖᙠᦻprogl.c஺hGᦪ3a[300],hGcnt,pjzl,pjz2஺ᦋᦪmain஺ஹᦪReadDat஺!ᑏᦪwriteDat஺Ḅᑁ&஺#includeinta[300],cnt=0;doublepjz1=0.0,pjz2=0.0;jsValue(){inti,qw,bw,sw,gw,n=0;for(i=0;i<300;i++){qw=a[i]/1000;bw=a[i]%1000/100;sw=a[i]%100/10;gw=a[i]%10;if(qw-bw-sw-gw>0){cnt++;pjz1+=a[i];}else{n++;pjz2+=a[i];})if(cnt==0)pjz1=0;elsepjzl/=cnt;

233if(n==O)pjz2=0;elsepjz2/=n;)main()(inti;readDat();jsValue();writeDat();printf("cnt=%d

234|ᩩḄ¿ᙳ[pzjl=%7.2fAnc|ᩩḄ¿ᙳ[pzj2=%7.2f

235u,cnt,pjz1,pjz2);)readDat()(FILE*fp;inti;fpXfopen("in.dat","r");for(i=0;i<300;i++)fscanf(fp,"%d,H,&a[i]);fclose(fp);}writeDat()(FILE*fp;inti;fp=fopen(Hout.dat","w");fprintf(fp,n%d

236%7.2f

237%7.2f

238",cnt,pjzl,pjz2);fclose(fp);}⚪+50ᦪReadDat(),-.ᦻin.dat/200ᦪ1ᑮᦪ3xx(5067ᙳ9:80)஺;ᑴᦪjsSort(),ᐸᦪḄ>?@A0BᓫDᢥFGḄᩩI0᣸K᣸ḄLMNᢥ0OPᐭᦪ3xxKᨬSᵨᦪWriteDat()ULMxx"#ᑮᦻout.dat஺ᩩ.VWᑖBXKYZᑖᢥḄASCII[ᓣ᣸K᣸YZᑖ]^ZᑖI0_ᣚ஺᝞Ma67B᜻ᦪKᑣᨬVḄcdeᜐᳮKN1ᙠaf஺g᝞012345678

239dcbahgfe432198765ᑣᜐᳮhgfeabcd876591234ᑖᙠᦻprog1.c஺ᦋᦪmain஺ஹᦪReadDat஺!ᑏᦪWriteDat஺Ḅᑁ&஺#include#include#includecharxx[20][80];voidjsSort(){inti,j,k,strl,half;chartemp;for(i=0;i<20;i++){strl=strlen(xxlij);half=strl/2;for(j=0;jxx[i][k]){temp=xx[i][j];xx[i][j]=xx[i][k];xxfilfk]=temp;}for(j=half-1,k=strl-1;j>=O;j—,k—){temp=xx[i][j];xx[i][j]=xx[i][k];xx[ilfk]=temp;}voidmain(){readDat();jsSort();writeDat();)readDat()(FILE*in;inti=0;char*p;in=fopen("in.dat,',"r");while(i<20&&fgets(xx[i],80,in)!=NULL){p=strchr(xx[i]An*)'if(p)*p=0'

240i++'fclose(in);writeDat()(FILE*out;inti;clrscr();out=fopen("out.dat","w");for(i=0;i<20;i++){printf("%s

241",xx[i]);fprintf(out,"%s

242",xx[i]);)fclose(out);)ਮ⚪+51hiᦪᦻIN.DATᨵ200klᦪKmhSᵨᦪreadDat஺Unoᦪᐭᦪ3aKὃq;ᑴWᦪjsVal(),ᐸ>?@Uᓟᦪ!ᓝᦪOP3ᡂWkPḄᓝᦪ(PᓝᦪḄᓝᦪ@alᦪḄᓟᦪKPᓝᦪḄkᦪ@alᦪḄᓝᦪ)KAUkᦪ!µᦪ3ᡂÁWkPḄᓝᦪ(PᓝᦪḄᓝᦪ@alᦪḄkᦪKPᓝᦪḄkᦪ@alᦪḄµᦪ)K᝞MP3ᡂḄÂkᓝᦪᙳ@ÃᦪzPᦪḄᓝᦪᙳcB¾KᑣÄ|ᩩḄlᦪᢥ.ᜧᑮ9Ḅᐭᦪ3bKm⌕~¨|fÅᩩḄlᦪḄkᦪent஺ᨬmain஺ᦪSᵨᑏᦪwriteDat஺ULMentAᦪ3bᔠᩩḄlᦪ"#ᑮOUT.DATᦻ஺ᑖᙠᦻprog1.c஺hGᦪ3a[200],b[200],hGentᦋᦪᦻIN.DATḄᦪஹᦪmain஺ஹᦪreadDat஺!ᑏᦪwriteDat()Ḅᑁ&஺#include#defineMAX200inta[MAX],b[MAX],ent=0;intisprime(intm){inti;for(i=2;i<=m/2;i++)if(m%i==0)return0;return1;voidjsVal()

243{inti,j,qw,bw,sw,gw;intab,cd;for(i=0;i<200;i-H-){qw=a[i]/1000;bw=a[i]%1000/100;sw=aliJ%100/10;gw=a[iJ%10;ab=10*qw+sw;cd=10*gw+bw;if(isprime(ab)&&isprime(cd)&&ab>=10&&cd>=10)b[cnt++J=a[iJ;)for(i=0;i

244”,ent);for(i=0;i

245H);writeDat();)writeDat()(FILE*fp;inti;fp=fopen("out.dat",nwu);fprintf(fp,u%d

246n,ent);for(i=0;i

247",b[i]);fclose(fp);)⚪+52

248WiᦪᦻIN.DATᨵ200klᦪKmÆSᵨᦪreadDat஺Unoᦪᐭᦪ3aKὃq;ᑴ-ᦪjsVal(),ᐸ>?@Uᓟᦪ!kᦪOP3ᡂWkPḄᓝᦪ(PᓝᦪḄᓝᦪ@alᦪḄᓟᦪKPᓝᦪḄkᦪ@alᦪḄkᦪ)KAUµᦪ!ᓝᦪ3ᡂÁWkPḄᓝᦪ(PᓝᦪḄᓝᦪ@alᦪḄµᦪKPᓝᦪḄkᦪ@alᦪḄᓝᦪ)K᝞MP3ᡂḄÂkᓝᦪᙳ@᜻ᦪmzÂkᓝᦪÈÉᨵWkᦪ?5᦮◀KÊËÂkPᦪḄᓝᦪᙳcB¾KᑣÄ|ᩩḄlᦪᢥ.ᜧᑮ9Ḅᐭᦪ3bKm⌕~¨|fÅᩩḄlᦪḄkᦪent,ᨬmain஺ᦪSᵨᑏᦪwriteDat()ULMentAᦪ3bᔠᩩḄlᦪ"#ᑮOUT.DATᦻ஺ᑖᙠᦻprogl.c஺hGᦪ3:a[200],b[200],hGentᦋᦪᦻIN.DATḄᦪஹᦪmain஺ஹᦪreadDat஺!ᑏᦪwriteDat()Ḅᑁ&஺#include#defineMAX200intalMAXJ,b[MAX],ent=0;voidjsVal(){inti,thou,hun,ten,data,j;intab,cd;for(i=0;i=10&&cd>=10)b[cnt++]=a[i];)for(i=0;i

249jsVal();printf("|ᩩḄᦪ=%d

250”,ent);for(i=0;i

251");writeDat();writeDat()!FILE*fp;inti;fp=fopen("out.datn,nwu);fprintf(fp,"%d

252",ent);for(i=0;i

253",b[i]);fclose(fp);ਮ⚪+53hiᦪᦻin.datᨵ300klᦪKmhSᵨᦪReadDat஺Unoᦪᐭᦪ3aK;ᑴWᦪjsVahie(),ᐸ>?@¬#ᓟᦪfḄᦪ¼µᦪfḄᦪ¼ᓝᦪfḄᦪ¼kᦪfḄᦪᜧ:¾Ḅkᦪent,·Uᡠᨵ|ᩩḄlᦪrsᐭᦪ3bKᯠDᦪ3bḄlᦪᢥ.9ᑮᜧḄI0᣸KᨬSᵨᑏᦪwriteDat஺ULM"#ᑮout.datᦻ஺g᝞:9123,9-12-g0,ᑣtᦪ|ᩩᐭᦪ3b,zkᦪent=cnt+1஺9812,9-8-1-2>0,ᑣtᦪc|ᩩºᶍ஺ᑖᙠᦻprogl.c஺hGᦪ3:a[300],b[300],hGentᦋᦪmain஺ஹᦪReadDat஺!ᑏᦪwriteDat()Ḅᑁ&஺#includeinta[3OO],b[3OO],cnt=O;jsValue(){inti,j,qw,bw,sw,gw;for(i=0;i<300;i++){qw=a[i]/1000;bw=a[i]/100%10;sw=a[i]%100/10;gw=a[i]%10;if((qw-bw-sw-gw)>0)b[cnt++]=a[i];)for(i=0;ib[j]){qw=b[i];b[i]=b[j];b[j]=qw;})main()

254inti;readDat();jsValue();writeDat();printf(ncnt=%d

255u,cnt);for(i=0;i)readDat()(FILE*fp;inti;fp=fopen("in.dat'

256rn);for(i=0;i<300;i+4-)fscanf(fp,n%d,'\&ali]);fclose(fp);)writeDat()(FILE*fp;inti;fp=fopen(',out.datKV'wn);fprintf(fp,H%d

257",cnt);for(i=0;i?@¬#ᓟᦪfḄᦪeµᦪfḄᦪ°:ᓝᦪfḄᦪekᦪfḄᦪḄkᦪent,·Uᡠᨵ|ᩩḄlᦪrsᐭᦪ3bKᯠDᦪ3bḄlᦪᢥ.ᜧᑮ9ḄI0᣸KᨬSᵨᑏᦪwriteDat()ULM"#ᑮout.datᦻ()g᝞7153,7+1=54-3,ᑣtᦪ|ᩩᐭᦪ3bKzkᦪcnt=cnt+l஺8129,8+102+9,ᑣtᦪc|ᩩºᶍ஺ᑖᙠᦻprogl.c஺hGᦪ3a[300],b[300],hGentᦋᦪmain஺ஹᦪReadDat()!ᑏᦪwriteDat஺Ḅᑁ&஺#includeintaf3OO],b[3OO],cnt=O;

258jsValue(){inti,j,qw,bw,sw,gw;for(i=0;i<300;i++){qw=a[i]/1000;bw=a[i]/100%10;sw=ali]%100/10;gw=a[iJ%10;if(qw+bw==sw+gw)b[cnt++]=a[i];)for(i=0;i

259",cnt);for(i=0;i}readDat()(FILE*fp;inti;fp=fopen("in.datn,"r");for(i=0;i<300;i++)fscanf(fp,',%d,,',&a[i]);fclose(fp);)writeDat()(FILE*fp;inti;fp=fopen("out.dat,',"w,');fprintf(fp,"Íd

260”,cnt);for(i=0;i

2613aK;ᑴWᦪjsValue஺Kᐸ>?@¬#ᡠᨵnolᦪ@ÃᦪḄkᦪent,·Uᡠᨵ|ᩩḄlᦪrsᐭᦪ3bKᯠDᦪ3bḄlᦪᢥ.9ᑮᜧḄI0᣸KᨬSᵨᑏᦪwriteDat஺ULM"#ᑮout.datᦻ஺g᝞5591@ÃᦪKᑣtᦪ|ᩩᐭᦪ3bKzkᦪcnt=cnt+l஺9812@ÎÃᦪKᑣtᦪc|ᩩºᶍ஺ᑖᙠᦻprogl.c஺hGᦪ3a[300],b[300J,hGentᦋᦪmain஺ஹᦪReadDat()!ᑏᦪwriteDat஺Ḅᑁ&஺#includeinta[3OO],b[3OO],cnt=O;intisP(intm){inti;for(i=2;ib[jl){value=b[i];b[i]=b[j];b[j]=value;}main()(inti;readDat();jsValue();writeDat();printf("cnt=%d

262H,cnt);for(i=0;i}readDat()(FILE*fp;inti;fp=fopen("in.dat”;T');for(i=0;i<300;i++)fscanf(fp,M%d'',&a[i]);fclose(fp);

263writeDat()(FILE*fp;inti;fp=fopen("out.dat","w");fprintf(fp,H%d

264H,cnt);for(i=0;i

265clrscr();if(ReadDat()){printf("ᦪᦻENGINc?ᡭâã

266\007H);return;)encryptChar();WriteDat();)intReadDat(void)(FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("eng.in",,,ru))==NULL)return1;while(fgets(xx[i],8O,fp)!=NULL){p=strchr(xx[i]An,);if(p)*p=O;i++')maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;fp=fopen(nps5.dat,,,"wH);for(i=0;i

267n,xx[i]);fprintf(fp,n%s

268n,xx[i]);Ifclose(fp);)ਭ⚪+57äᨵnkåæᙶWᙌmᢥË┐êᔣ.1ᑮn;ìK.ískåâÚI01ᑮmḄîᦪ,îᦪᑮímkåKå#ᙌK·.ïḄðWkåOPâÚ1ᑮmḄîᦪK᝞I0ðñòᑮ

269ᡠᨵḄåó#ᙌBô஺-⌕¬ᢥ#ᙌsKF#nnkåḄ⊤p஺ὃq;ᑴᦪJosegh(),->?mSᵨᦪWriteDat஺U;ìᢥ᯿#ᙌḄ"#ᑮOUT.DATᦻ஺í1k#ᙌḄ;ì1ᙠp[0]Kí2k#ᙌḄ;ì1ᙠp[l],òÈínk#ᙌḄ;ì1ᙠp[n-l]஺än=100,s=1,m=10I0;஺ᑖ1ᙠPROG1.C஺ᦋᦪmain஺!"#ᦪᦪWriteDat()Ḅᑁ&஺#include#defineN100#defineS1#defineM10intp[100],n,s,m;voidWriteDat(void);voidJosegh(void){inti,j,sl,w,q[100];for(i=0;isl=s;for(i=l;i<=n;i++)p[i-l]=i;for(i=n;i>=2;i—){sl=(sl+m-1)%i;if(sl==O)sl=i;w=p[sl-l];for(j=sl;jp[i-l]=w;)for(i=0,j=n-l;i=0;i++,j-)q[j]=p[i];for(i=0;i

270printf("

271");fprintf(fp,"

272");))fclose(fp);⚪+58-ᨵWk10kå1000Ḅ⌱ἠᦪᦻIN.DAT,ᐸᦪ1ḄÛÜ@5ᩩḄ67ᙳB10KíW⊤ùíWkåḄ⌱úûKíX⊤ùíXkåḄ⌱úûKrüý:ᑁ&ᙳB0!1,1⊤ùå⌱K0⊤ùåþ⌱K®Wÿ⌱ἠᦪ5ᦔḄ⌱ἠ஺ᦪReadDat()Ḅ⌱ἠᦪᐭᑮᦪxx஺!ᑴᦪCountRs஺ᩭ$%&Ḅ⌱ἠᦪ'(ἠᦪ)*+ᐭyy,-Uyy[9]஺./yy01ᑮᦻ3OUT.DAT஺4ᑖ678+ᙠᦻ3progl.c஺:ᦋ<=ᦪmain஺ஹᦪᦪReadDat஺?01ᦪᦪwriteDat()ḄᑁA஺#includecharxx[100][ll];intyy[10];intReadDat(void);voidWriteDat(void);voidCountRs(void){inti,j,count;for(i=0;i<100;i++){count=0;for(j=0;j<10;j++)if(xx[i][j]==,r)count++;if(count<=5)continue;for(j=0;j<10;j++)if(xx[i][j]=='r)yyfj]++;)voidmain()(inti;for(i=0;i

273\007n);return;

274CountRs();WriteDat();intReadDat(void)!FILE*fp;inti;if((fp=fopen(,'IN.DAT',J'rM))==NULL)return1;for(i=0;i<100;i++){if(fgets(xx[ij,l2,fp)==NULL)return1;xx[iJllO]=W;)fclose(fp);return0;voidWriteDat(void)(FILE*fp;inti;fp=fopen("OUT.DAT,,J,wn);for(i=0;i<10;i++){fprintf(fp,',%d

275,,,yy[i]);printf("KLdḄ⌱ἠᦪ=%d

276”,i+l,yy[i]);)fclose(fp);ਭ⚪O59PQᦪᦻ3IN.DAT+ᨵ200STᦪU'PVᵨᦪreadDat஺XYᦪ+ᐭᦪaUὃ[!ᑴ\ᦪjsVal,ᐸ^ᓟTᦪ?`Tᦪabᡂ\bḄI-TᦪabdbᓝTᦪḄᓝTᦪfSTᦪḄᓟTᦪUbᓝTᦪḄTᦪfSTᦪḄ`TᦪgUhiTᦪ?jTᦪᡂk\bḄ`Tᦪcddb`TᦪḄᓝTᦪfSTᦪḄTᦪUbᓝTᦪḄTᦪfSTᦪḄjTᦪgU᝞/bᡂḄmᓝTᦪab

277ᙳEwUᑣyz{|ᩩ3ḄSTᦪᢥᜧᑮḄ8+ᐭᦪBU'⌕%z{ᩩ3ḄSTᦪḄᦪCNT஺ᨬMAIN஺ᦪVᵨᑏᦪWRITEDATO./CNThiᦪBᔠᩩ3ḄSTᦪ01ᑮOUT.DATᦻ3஺^4ᑖ678+ᙠᦻ3progLc஺78Pᦪ^a[200],b[200],P^ent:ᦋ<ᦪᦻ3IN.DATḄᦪஹ=ᦪmain஺ஹᦪreadDat()?ᑏᦪwriteDat()ḄᑁA஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsVal(){inti,thou,hun,ten,data,j;intab,cd;for(i=0;i=10&&cd>=10){b[cnt]=a[i];cnt++;})for(i=0;i

278n);writeDat();

279writeDat()(FILE*fp;inti;fp=fopen("out.dat","wu);fprintf(fp,n%d

280H,ent);for(i=0;i

281u,b[i]);fclose(fp);)⚪O60ᙠᦻ3in.datᨵ200ᦪU&ᨵ3ᦪU&ᦪᙳTᦪ஺ᦪReadDat()X200ᦪ+ᑮ.᪀ᦪaaU!ᑴᦪjsSort(),ᐸᦪḄ^⌕ᙠ200ᦪ1ᩩ3&ḄKᦪᜧK\ᦪKᦪḄ?Uᐸz{ᩩ3ḄᦪᦪjsSort()Ḅ¡Uuz{ᩩ3Ḅᦪ+ᐭ.᪀ᦪbbU¢£bbḄᦪᢥ᯿&ᦪḄKᦪK?Ḅᜧ¥¦§8᣸ᑡ(KᦪKᦪḄ?ᙳEª)U᣸8Ḅ./«ab+ᐭ.᪀ᦪbbUᨬVᵨᦪWriteDat஺./bb01ᑮᦻ3out.dat஺4ᑖ678+ᙠᦻ3progl.c஺:ᦋ<=ᦪmain஺ஹᦪᦪReadDat஺?01ᦪᦪWriteDat஺ḄᑁA஺#include#include#includetypedefstruct{intxl,x2,x3;}data;dataaa[200],bb[200];intjsSort(){inti,j,cnt=0;datach;for(i=0;i<200;i++)if(aa[i].x2>aa[i].xl+aa[i].x3)bb[cnt++]=aa[i];for(i=0;i

282readDat();count=jsSort();/*z{ᩩ3Ḅᦪ*/writeDat(count);)readDat()(FILE*in;inti;in=fopen("in.dat”;T');for(i=0;i<200;i++)fscanf(in,"%d%d%d",&aa[i].xl,&aa[i].x2,&aa[i].x3);fclose(in);)writeDat(intcount)(FILE*out;inti;out=fopen(,,out.dat,',,'wu);clrscr();for(i=0;iprintf(H%d,%d,%dKᦪ+Kᦪ=%d

283H,bb[i].xl,bbfil.x2,bb[i].x3,bb[i].x2+bb[i].x3);fprintf(out,"%d%d%d

284”,bb[i].xl,bb[“.x2,bb[j].x3);)fclose(out);ਭ⚪O61PQᙠᦻ3IN.DAT+ᨵ100¯°├²³´U&¯°├²³´ᵫ¯°¶ṹdmd¸4TgU¯°¹ºmed¸10TgUᓫ¼djd᦮¸gUᦪsid᦮¸gU½¾jed¿᦮¸gÀ4ᑖᡂ஺ᐸ^½¾=ᓫ¼*ᦪ%(1஺ᦪReadDatX100├²³´'+ᐭ.᪀ᦪsell஺!ᑴᦪSorlDat஺Uᐸ⌕^ᢥ½¾ᑮᜧ¥¦᣸ᑡUÁ½¾ªuUᑣᢥ¯°¶ṹᜧᑮ¥¦᣸ᑡUᨬÂ᣸ᑡ./«+ᐭ.᪀ᦪsellUᨬVᵨᦪWriteDat஺./01ᑮᦻ3OUT2.DAT஺4ᑖ678+ᙠᦻ3progl.c஺:ᦋ<=ᦪmain஺ஹᦪᦪReadDal஺?01ᦪᦪWriteDat஺ḄᑁA஺#include#include

285#include#include#include#defineMAX100typedefstruct{chardm[5];/*¯°¶ṹ*/char¯°¹º*/intdj;/*ᓫ¼*/intsi;/*ᦪ*/longje;/*½¾*/}PRO;PROsellLMAXJ;voidReadDat();voidWriteDat();voidSortDat(){inti,j;PROxy;for(i=0;i<99;i++)for(j=i+l;j<100;j++)if(sellfi].je>sell[j].jellsell[i].je==sell[j].je&&strcmp(sell[i].dm,sell[j].dm)

286memcpy(ch,str+14,4);ch[4J=0;sell[i].dj=atoi(ch);memcpy(ch,str+18,5);ch[5J=0;sell[i].sl=atoi(ch);sell[i].je=(long)sell[i].dj*sell[i].sl;}fclose(fp);)voidWriteDat(void)(FILE*fp;inti;fp=fopen(nOUT2.DATuJ'wu);for(i=0;i<100;i++){printf(H%s%s%4d%5d%5d

287M,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);fprintf(fp,n%s%s%4d%5d%5d

288M,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);)fclose(fp);ਮ⚪O62ᦪReadDat஺ÄÅᦻ3ENGIN\ÆÇᦻᦻÈU+ᐭᑮᦪxxJ!ᑴᦪencryptChar஺UᢥḄɶᐵË£ᦪxxḄᡠᨵ¥¦É¶U«+ᐭᦪXXḄ£ÍḄTÎUᨬVᵨᦪWriteDatO./xx01ᑮᦻ3PS2,DAT஺ɶᐵË^f(p)=p*13mod256(pᦪÏ\ḄASCH¡Uf(p)%bḄASCH¡)U᝞/%f(p)¡32ᡈᐸASCII¡ᏔᦪUᑣÑEUᔲᑣyf(p)ᡠ£ÍḄ¥¦É¶஺4ᑖ678+ᙠᦻ3progl.c஺fÓᦪᦻ3+ḄÔÕ^&¦ḄÖ×ᙳ80஺:ᦋ<=ᦪmain஺ஹᦪᦪReadDat஺?01ᦪᦪWriteDat஺ḄᑁA஺#include#include#include#includeunsignedcharxx[50][80];intmaxline=0;/*ᦻÈḄئᦪ*/intReadDat(void);

289voidWriteDat(void);voidencryptChar():inti,j;for(i=0;i

290\007H);return;)encryptChar();WriteDat();intReadDat(void)FILE*fp;inti=0;unsignedchar*p;if((fp=fopen(1'eng.in",,,r,'))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],,

291,);if(p)*p=O;i++Jmaxline=i;fclose(fp);return0;IvoidWriteDat(void)FILE*fp;inti;fp=fopen(',ps2.dat,',uwn);

292for(i=0;i

293",xx[i]);fprintf(fp,"Ls\rT,xx[i]);)fclose(fp);ਭ⚪O6378progl.cḄ^sḄᡠᨵÛÜ\TÎUḄK\Üᑮᨬ஺ὃ[!ᑏᦪchg(char*s)ÄÅ78⌕UᨬVᵨᦪreadwriteDAT()./01ᑮbc2.outᦻ3஺Ý᝞^sfᨵᑁA:Mn.l23xyZ,ᑣVᵨÑᦪU./^n.123xyZMo^4ᑖ678+ᙠᦻ3progl.cᦻ3஺:ᦋ<=ᦪmain()?01ᦪᦪreadwriteDAT஺ḄᑁA஺#include#include#defineN81voidreadwriteDAT();voidchg(char*s){inti;charch=*s;for(i=0;i

294FILE*rf,*wf;rffopen("bc2.inßT”)Jwf=fopen("bc2,outH,"w");for(i=0;i<50;i++){fscanf(rf,"%s",a);chg(a);fprintf(wf,u%s

295n,a);)fclose(rf);fclose(wf);)ਭ⚪O64àᑡ78Ḅ^1ᡠᨵ100hᑁ(á100)z{I,1+4,1+10âãᦪḄ᦮ᦪI(1+10äᙠ100hᑁ)ḄᦪenthiXYI?sum!ᑏᦪcountValue()oÄÅ78⌕ḄUᨬVᵨᦪwriteDat஺./ent?sum01ᑮᦻ3out.dat஺4ᑖ678+ᙠᦻ3progl.c஺:ᦋ<=ᦪmain஺?01ᦪᦪwriteDat஺ḄᑁA஺#includeintent,sum;intisPrime(intm)(inti;for(i=2;iif(m%i==0)return0;return1;)voidcountValue(){inti;for(i=2;i<=90;i++)if(isPrime(i)&&isPrime(i+4)&&isPrime(i+l0)){cnt++;sum+=i;})voidmain()(cnt=sum=0;countValue();printf("z{ᩩ3Ḅ᦮ᦪḄᦪ=%d

296”,cnt);printf("z{ᩩ3Ḅ᦮ᦪḄ?¡=%d

297”,sum);writeDat();

298writeDat()(FILE*fp;fp=fopen(',out.dat,\"wH);fprintf(fp,n%d

299%d

300'\cnt,sum);fclose(fp);)ਮ⚪O65PQᙠᦻ3IN.DAT+ᨵÁå(ᦪீ200)STᦪḄç᦮ᦪUᦪReadDat஺XÁåç᦮ᦪ'+ᐭᦪxx஺!ᑴᦪCalValueO,ᐸ⌕^1ஹ1Xᦻ3ᐳᨵéêç᦮ᦪtotNumJ2ஹXYᦪḄᔜTᦪ?᜻ᦪḄᦪḄᦪtolCnt,hiz{|ᩩ3ḄXYᦪḄìíᙳ¡totPjz,ᨬVᵨᦪwriteDat()ᡠḄ./01ᑮᦻ3OUT.DAT஺4ᑖ678+ᙠᦻ3progl.c஺:ᦋ<=ᦪmain஺ஹᦪReadDat()?ᑏᦪwriteDat஺ḄᑁA஺#include#include#defineMAXNUM200intxx[MAXNUM];inttotNumH);/*ᦻ3IN.DATᐳᨵéêç᦮ᦪ*/inttotCnt=0;/*ᔠᩩ3Ḅç᦮ᦪḄᦪ*/doubletotPjz=0.0;/*íᙳ¡*/intReadDat(void);voidwriteDat(void);voidCalVaiue(void){inti,qw,bw,sw,gw;for(i=0;i0){totNum++;qw=xx[i]/1000;bw=xx[i]/100%10;sw=xx[i]%100/10;gw=xx[i]%10;if((qw+bw+sw+gw)%2){totCnt++;totPjz+=xx[i];})if(totCnt==0)totPjz=0;elsetotPjz/=totCnt;

301voidmain()inti;clrscr();for(i=0;iif(ReadDat()){printf("ᦪᦻ3IN.DATEᡭG!\007

302”)Jreturn;)CalValue();printf("ᦻ3IN.DATᐳᨵç᦮ᦪ%d

303”,toiNum);printf("ᔠᩩ3Ḅç᦮ᦪḄᦪ=%d

304”,totCnt);printf("íᙳ¡=%.2f

305”,totPjz);writeDat();}intReadDat(void)(FILE*fp;inti=0;if((fp=fopen(,'IN.DAT"J'r,,))==NULL)return1;while(!feof(fp)){fscanf(fp,"%d,",&xx[i++]);)fclose(fp);return0;)voidwriteDat(void)(FILE*fp;fp=fopen(,'OUT.DAT,',,,wn);fprintf(fp,',%d

306%d

307%6.2f

308',,totNum,totCnt,totPjz);fclose(fp);ਭ⚪O66àᑡ78progl.cḄ^%500-800îïᑁãᦪḄᦪent,'ᢥᡠãᦪḄ¡ᜧᑮḄ8U¢%ᐸï◞ஹñ?UᓽK1ãᦪ-K2ãᦪ+K3ãᦪ-K4ãᦪ+K5ãᦪ…Ḅ¡sum஺!ᑏᦪcountValue()ÄÅ78Ḅ⌕UᨬVᵨᦪwriteDat()./ent?sum,01ᑮᦻ3OUT11.DAT஺

3094ᑖ678P1஺:ᦋ<=ᦪmain()?01ᦪᦪwriteDat()ḄᑁA஺#includeintent,sum;intisP(intm){inti;for(i=2;i500;i-)if(isP(i))(cnt++;sum=sum+k*i;k=k*(-l);}))voidmain()(cnt=sum=0;countValue();printf("ãᦪḄᦪ%11”,cnt);printf("ᢥ⌕%Ḅ¡=%d

310”,sum);writeDat();)writeDat()(FILE*fp;fp=fopen("OUTl1.DAT",nwn);fprintf(fp,"%d

311%d

312",cnt,sum);fclose(fp);

313⚪O67àᑡ78Ḅ^⌱15000hàᔠᩩ3Ḅõᯠᦪ஺ᩩ3^ᓟTᦪ÷jTᦪ?ᓝTᦪ÷Tᦪ?UqᓟTᦪ÷jTᦪ?Tᦪ÷ᓟTᦪøḄ10ù஺%'01XYSTõᯠᦪḄᦪenthiXYᦪḄ?sum஺!ᑏᦪcountValue஺ÄÅ78Ḅ⌕Uᨬ•VᵨᦪwriteDat()./ent?sum,01ᑮᦻ3OUT13.DAT஺4ᑖ678+ᙠᦻ3progl.c஺:ᦋ<=ᦪmain()?01ᦪᦪwriteDat஺ḄᑁA஺#includeintent,sum;voidcountValue(){inti,thou,hun,ten,data;for(i=1000;i<5000;i++){thou=i/1000;hun=i%1000/100;ten=i%100/10;data=i%10;if(thou+hun==ten+data&&thou+hun==(data-thou)*10){cnt++;sum+=i;})voidmain()(cnt=sum=0;countValue();printf("z{ᩩ3ḄõᯠᦪḄᦪ=%(1\û,5஺Jprintf("z{ᩩ3ḄõᯠᦪḄᦪ?=%ü”,5ý);writeDat();writeDat()(FILE*fp;fp=fopen("OUTl3.DAT”,W);fprintf(fp,,,%d

314%d

315,\cnt,sum);fclose(fp);)ਮ⚪O68PQᦪᦻ3IN.DAT+ᨵ200STᦪU'PVᵨᦪreadDat஺XYᦪ+ᐭᦪ

316aὃᑴᦪjsVal(),ᐸ᝞ᦪᔜḄᦪᙳ᜻ᦪᑣ"#$%&'ᩩ)Ḅ*ᦪent./01ᦪᢥ3ᜧᑮ6Ḅ789ᐭᦪ;b஺ᨬ?main஺ᦪBᵨᑏᦪwriteDat()/HentIJᦪ;bKᔠᩩ)ḄᦪM$ᑮOUT.DATᦻ)஺TUVᑖXY89ᙠᦻ)progLc஺Y8`abᦪ;:a[200],b[200J,`abjkentlᦋnᦪoᦻ)IN.DATḄrsᦪoஹuᦪmain஺ஹvᦪreadDat஺xᑏᦪwriteDat()Ḅᑁz஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsValO{intij,thou,hun,ten,data;for(i=0;i<200;i++){thou=alij/1000;hun=aLiJ%1000/100;ten=a[i]%100/10;data=a[i]%10;if(thou&&thou%2&&hun%2&&ten%2&&data%2)b[cnt++J=a[i];)for(i=0;i

317,ent);for(i=0;i

318,');writeDatO;writeDat()

319FILE*fp;inti;fp=fopenC^ut.dat",nwu);fprintf(fp,"%d

320",ent);for(i=0;i

321n,b[ij);fclose(fp);)⚪69`ᦪoᦻ)IN.DAT9ᨵ200*ᦪ.`BᵨvᦪreadDat஺/01ᦪ9ᐭᦪ;aὃᑴᦪjsVal(),ᐸ/*ᦪḄᓟᦪḄᦪḄᓝᦪḄᨬ?*ᦪḄ᝞¢$Ḅᜧ£¤£¥¦§ᦪ᜻ᦪᑣ"#$%&'ᩩ)Ḅ*ᦪent./01ᦪᢥ36ᑮᜧḄ789ᐭᦪ;bᨬ?BᵨᑏᦪwriteDat஺/HentIJᦪ;bKᔠᩩ)ḄᦪM$ᑮOUT.DATᦻ)஺TUVᑖXY89ᙠᦻ)progl.c஺Y8`abᦪ;:a[200],b[200],`abjkentlᦋnᦪoᦻ)IN.DATḄrsᦪoஹuᦪmain஺ஹvᦪreadDat஺xᑏᦪwriteDat()Ḅᑁz஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsValO{intij,thou,hun,ten,data;for(i=0;i<200;i++){thou=a[i]/l000;hun=a[i]%1000/100;ten=a[i]%100/10;data=a[i]%10;if(thou-hun-ten-data>=0&&a[i]%2)b[cnt++]=a[i];)for(i=0;ib[j]){thou=b[i];b[i]=b[j];b[j]=thou;}}voidreadDat()(inti;FILE*fp;fp=fopen("in.dat",nrn);for(i=0;i

322voidmain()(inti;readDat();jsVal();printf("%&ᩩ)Ḅᦪ=%(1\11",ent);for(i=0;i

323n);writeDat();)writeDat()(HLE*fp;inti;fp=fopen("out.dat","wu);fprintf(fp,ent);for(i=0;i

324",b[i]);fclose(fp);⚪70`ᙠᦻ)IN.DAT9ᨵ¨©*(*ᦪ200)ᦪḄª᦮ᦪᦪReadDat()v¬0¨©*ª᦮ᦪ.9ᐭᦪ;xx஺ᑴᦪCalValue(),ᐸ⌕®1ஹ®$0ᦻ)ᐳᨵ°±*ª᦮ᦪtotNum2ஹ®01ᦪ²³1?´Ḅµᦪ᜻ᦪḄᦪḄ*ᦪtotCnt,IJ%&'ᩩ)Ḅ01ᦪ(²³¶Ḅ)Ḅ·¸¹ᙳtotPjz,ᨬ?BᵨᦪwriteDat஺/ᡠ®ḄHM$ᑮᦻ)OUT.DAT஺VᑖXY89ᙠᦻ)progl.c஺lᦋnuᦪmain()ஹvᦪReadDat()xᑏᦪwriteDat஺Ḅᑁz஺#include#include#defineMAXNUM200intxx[MAXNUM];inttotNum=0;/*ᦻ)IN.DATᐳᨵ°±*ª᦮ᦪ*/inttotCnt=0;/*Kᔠᩩ)Ḅª᦮ᦪḄ*ᦪ*/doubletotPjz=0.0;/*¹ᙳ*/intReadDat(void);voidwriteDat(void);

325voidCalValue(void){inti,data;for(i=0;i0){totNum++;data=xx[i]»l;if(data%2){totCn;totPjz+=xx[i];))if(totCnt==0)totPjz=0;elsetotPjz/=totCnt;)voidmain()(inti;clrscr();for(i=0;iif(ReadDat()){printf("ᦪoᦻ)IN.DAT»ᡭ½!\007

326");return;)CalValue();printf("ᦻ)IN.DATᐳᨵª᦮ᦪ=%d*

327”,totNum);printf("Kᔠᩩ)Ḅª᦮ᦪḄ*ᦪ=%d*

328”,totCnt);printf(“¹ᙳ=%.2An”,totPjz);writeDat();)intReadDat(void)(FILE*fp;inti=0;if((fp=fopen(nIN.DAT",nrn))==NULL)return1;while(!feof(fp)){fscanf(fp'%d/',&xx[i++]);)fclose(fp);return0;voidwriteDat(void)

329FILE*fp;fp=fopen(,'OUT.DATM,,,wM);fprintf(fp,',%d

330%d

331%6.2f

332',,totNum,totCnt,totPjz);fclose(fp);ਭ⚪71ᦪReadDat஺ÁÂ3ᦻ)in.datv¬20Ãᦪo9ÄᑮKÅᦪ;xx(ÆÃKÅÇÈᙳ6£80)஺ᑴᦪjsSort(),ᐸᦪḄIÃÉᓫËKÅᢥÌaḄᩩ)ÍÃ᣸8᣸8?ḄHÏᢥÃе9ᐭKÅᦪ;xxᨬ?BᵨᦪWriteDat()/HxxM$ᑮᦻ)out.dat஺ᩩ)3KÅÑᑖÉÒÓÔVᑖᢥKḄASCIIÕ8᣸8²ÔVᑖᢥKḄASCIIᓣ8᣸8஺᝞§KÅÇÈÉ᜻ᦪᑣᨬÑḄK»×Ø᣸8KÏÄᙠ§Ù஺Ú᝞Ù012345678XKÅabcdhgfe123498765ᑣᜐᳮ?KÅdcbaefgh432195678VᑖXY89ᙠᦻ)progl.c஺lᦋnuᦪmain஺ஹvᦪoᦪReadDat஺xMᦪoᦪWriteDat஺Ḅᑁz஺#include#include#includecharxx[20][80];voidjsSort(){inti,j,k,strl,half;charch;for(i=0;i<20;i++){strl=strlen(xx[i]);half=strl/2;for(j=0;jxx[i][k]){ch=xx[i][j];xx[i][j]=xx[i][k];xx[i][k]=ch;}

333voidmain()(readDat();jsSort();writeDat();)readDat()(FILE*in;inti=0;char*p;in=fopen("in.datu?'rn);while(i<20&&fgets(xx[i],80,in)!=NULL){p=strchr(xx[i]An,);if(p)*p=O;i++)fclose(in);)writeDat()(FILE*out;inti;clrscr();out=fopen(,,out.dat,,»,,w");for(i=0;i<20;i++){printf(,,%s

334,',xx[i]);fprintf(out,"%s

335",xx[i]);)fclose(out);)⚪72`ᦪoᦻ)IN.DAT9ᨵ200*ᦪ.`BᵨvᦪreadDat஺/01ᦪ9ᐭᦪ;aὃᑴᦪjsVal(),ᐸ/*ᦪxᓟᦪе;ᡂ*µḄI-ᦪ(µᓝᦪḄᓝᦪ§ᦪḄ*ᦪµᓝᦪḄ*ᦪ§ᦪḄᓟᦪ)IJ/ᦪxÞᦪ;ᡂß*µḄÞᦪ(µÞᦪḄÞᦪ§

336ᦪḄᦪµᓝᦪḄ*ᦪ§ᦪḄᓝᦪ)᝞µ;ᡂḄà*ᓝᦪᙳᏔᦪ.¦à*ᓝᦪâ±ᨵ*ᦪã9᦮◀åæà*µᦪḄᓝᦪᙳ»É¥ᑣç%&'ᩩ)Ḅᦪᢥ3ᜧᑮ6Ḅ789ᐭᦪ;b.⌕#·%&èᩩ)ḄᦪḄ*ᦪcntoᨬ?main஺ᦪBᵨᑏᦪwriteDat()/HentIJᦪ;bKᔠᩩ)ḄᦪM$ᑮOUT.DATᦻ)஺TUVᑖXY89ᙠᦻ)progl.c஺Y8`abᦪ;a[200],b[200],`abjkentlᦋnᦪoᦻ)IN.DATḄrsᦪoஹuᦪmain஺ஹvᦪreadDat஺xᑏᦪwriteDat()Ḅᑁz஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsVal(){intij,thou,hun,ten,data,ab,cd;for(i=0;i<200;i++){thou=a[ij/l000;hun=a[i]/l00%10;ten=a[i]%100/10;data=a[i]%10;ab=10*data+thou;cd=10*hun+ten;if((ab%9==0llcd%9==0)&&ab%2==0&&cd%2==0&&hun!=0&&data!=0){b[cnt]=a[i];cnt++;})for(i=0;i

337”,ent);for(i=0;i

338");writeDatO;

339writeDat()(FILE*fp;inti;fp=fopen("out.datn,nwu);fprintf(fp,u%d

340n,ent);for(i=0;i

341”,b[ij);fclose(fp);)ਭ⚪73ᦪReadDat஺ÁÂ3ᦻ)IN.DATv¬êëᦻᦻì9ᐭᑮKÅᦪ;xxᑴᦪConverCharD஺ᐸᦪḄIÃÉᓫ/KÅḄᡠᨵ6ᑏíᦋᑏᡂîíḄ*í᝞ía,ᑣᦋᑏᡂízoᜧᑏíÏÉᜧᑏí6ᑏíÏÉ6ᑏíᐸïK»j஺ᨬ?/`ᜐᳮḄKÅÏᢥÃе9ᐭKÅᦪ;XXᨬ?BᵨᦪwriteDat()/HxxM$ᑮᦻ)OUT4.DAT஺Ú§ᦻAdb.Bcdzaabck.LLhjHAca.Bbcyzzabj.LLgi§ðᦪoᦻ)9ÄḄñòÆÃḄóÈᙳ6£80*Kô᪗öK÷xøñ஺VᑖXY89ᙠᦻ)progl.c஺lᦋnuᦪmain஺ஹvᦪoᦪReadDat஺xM$ᦪoᦪwriteDat஺Ḅᑁz஺#include#include#includecharxx[50][80];intmaxline=0;/*ᦻìḄùÃᦪ*/intReadDat(void);voidWriteDat(void);voidConvertCharD(void){inti,jfor(i=0;i=,b,&&xx[i][j]<=,z,)xx[i][j]-=l;

342voidmain()(clrscr();if(ReadDat()){printf("ᦪoᦻ)IN.DAT»ᡭ½!

343\007H);return;)ConvertCharD();WriteDat();intReadDat(void)(FILE*fp;inti=0;char*p;if((fp=fopen(,'IN.DAT,',nr,,))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],,

344,);if(p)*p=O;i++;}maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;clrscr();fp=fopen(nOUT4.DAT"'wu);for(i=0;i

345,',xx[i]);fprintf(fp,M%s

346,,,xx[i]);)fclose(fp);)

347ਭ⚪74ᦪReadDat஺ÁÂ3ᦻ)IN.DATv¬êëᦻᦻì9ᐭᑮKÅᦪ;xxᑴᦪStrCharJL(),ᐸᦪḄIÃÉᓫ/KÅḄᡠᨵKḄASCHÓ³4,ú⊡0,᝞Ó³?ᐸKḄASCII6£¤£32ᡈᜧ£100,ᑣ§Kýᢝ»j,ᔲᑣḄASCIIASCIIᑮḄᐭḄ஺ᨬᜐᳮḄᢥ!ᐭᦪ#xx$ᨬ%ᵨ'ᦪwriteDat஺()xx*+ᑮᦻ-OUT7.DAT$஺.ᦪ/ᦻ-0Ḅ12345Ḅ67ᙳ9:80;<᪗>?@A1஺BᑖDEFᙠᦻ-progl.c$஺HIᦋKL'ᦪmain஺ஹNᦪ/'ᦪReadDat஺@*+ᦪ/'ᦪwriteDal஺ḄᑁP஺#include#include#includecharxx[50J[80J;intmaxline=0;/*ᦻQḄRᦪ*/intReadDat(void);voidWriteDat(void);voidStrCharJL(void){inti,jUcharc;for(i=0;i100))xx[i][j]+=c;voidmain()(clrscr();if(ReadDat()){printf("ᦪ/ᦻ-IN.DATXYᡭ[!

348\007H);return;)StrCharJL();WriteDat();)intReadDat(void)FILE*fp;

349inti=0;char*p;if<(fp=fopen("IN.DAT,,U'r"))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],r

350,);if(p)*p=O;i++U)maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;clrscr();fp=fopen(HOUT7.DAT","wu);for(i=0;i

351”,xx[i]);fprintf(fp,H%s

352",xx[i]);)fclose(fp);)ਭ⚪`75ᙠᦻ-in.dat$ᨵ200#ᦪ/5#ᨵ3;ᦪ5;ᦪᙳ3bᦪ஺'ᦪReadDat஺Ncd200#ᦪ/0ᑮ(᪀ᦪ#aa$Hfᑴ'ᦪjsSort(),ᐸ'ᦪḄiY34⌕kᙠ200#ᦪ/$l+ᩩ-n5#$Ḅop;ᦪᜧ:or;ᦪob;ᦪḄ@ᐸ$stᩩ-Ḅ#ᦪun'ᦪjsSortOḄvwxystᩩ-Ḅᦪ/ᐭ(᪀ᦪ#bb$bb$Ḅᦪ/ᢥ᯿5#ᦪ/Ḅop;ᦪob;{@Ḅᜧ9|ᓣF᣸ᑡ(o•;ᦪob;ᦪḄ@ᙳX)᣸FḄ()!ᐭ(᪀ᦪ#bb$ᨬ%ᵨ'ᦪwriteDat()()bb*+ᑮᦻ-out.dat$஺BᑖDEFᙠᦻ-progl.c$஺HIᦋKL'ᦪmain஺ஹNᦪ/'ᦪReadDat஺@*+ᦪ/'ᦪWriteDat஺ḄᑁP஺#include#include#includetypedefstruct{intxl,x2,x3;

353}data;dataaal200J,bbl200J;intjsSort(){inti,j,cnt=0;dataxy;for(i=0;i<200;i++)if(aa[i],x1>(aa[i].x2+aa[i].x3))bb[cnt++]=aa[i];for(i=0;ibb[j].xl+bb|j].x3){xy=bb[i];bb[i]=bb[j];bb[j]=xy;}returnent;1voidmain()(intcount;readDat();count=jsSort();/*vwstᩩ-Ḅ;ᦪ*/writeDat(count);)readDat()(FILE*in;inti;in=fopen("in.dat,',,'rM);for(i=0;i<200;i++)fscanf(in,H%d%d%dM,&aa[i].x1,&aa[i].x2,&aa[i].x3);fclose(in);)writeDat(intcount)(FILE*out;inti;clrscr();out=fopen("out.dat,',,,w");for(i=0;iprintf("%d,%d,%dop;ᦪ+ob;ᦪ=%d

354",bb[i].x1,bb[i].x2,bb[i].x3,bb[i].x1+bb[i].x3);

355fprintf(out,M%d%d%d

356H,bb[i].xl,bb[i].x2,bb[i].x3);fclose(out);ਭ⚪`76Jᦪ/ᦻ-IN.DAT$ᨵ200;ᦪ%ᵨN'ᦪreadDat஺dᦪᐭᦪ#a$Hὃfᑴp'ᦪjsVal(),ᐸiY34;ᦪ@ᓟᦪ!#ᡂp;Ḅᓝᦪ(ᓝᦪḄᓝᦪ3ᦪḄ;ᦪᓝᦪḄ;ᦪ3ᦪḄᓟᦪ)ᦪ@ᦪ#ᡂp;Ḅᓝᦪ(ᓝᦪḄᦪ3ᦪḄᦪᓝᦪḄ;ᦪ3ᦪḄᓝᦪ)᝞)#ᡂḄ;ᓝᦪ3p;᜻ᦪp;nᏔᦪ;ᦪ$ᨵ••;ᦪY17᦮◀xy;ᦪḄᓝᦪᙳXnᑣst¡ᩩ-Ḅᦪᢥ¢ᜧᑮ9Ḅ£Fᐭᦪ#b$⌕¤¥st¦ᩩ-ḄᦪḄ;ᦪent஺ᨬmain஺'ᦪ%ᵨᑏ'ᦪwriteDat஺()entᦪ#b$ᔠᩩ-Ḅᦪ*+ᑮOUT.DATᦻ-$஺©ª4BᑖDEFᙠᦻ-progLc$஺EF$«¬ᦪ#4a[200],b[200],«¬®4entHIᦋKᦪ/ᦻ-IN.DAT$Ḅ¯°ᦪ/ஹL'ᦪmain஺ஹN'ᦪreadDat஺@ᑏ'ᦪwriteDat()ḄᑁP஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsVal(){inti,j,thou,hun,ten,data,ab,cd;for(i=0;i=10&&cd>=10))b[cnt++]=a[i];)for(i=0;i

357for(i=0;i

358”,ent);for(i=0;i

359");writeDat();1writeDat()(FILE*fp;inti;fp=fopenC'out.dat","w");fprintf(fp,"±d

360”,ent);for(i=0;i

361",b[i]);fclose(fp);ਭ⚪`77ᦪ/ᦻ-IN.DAT$ᨵ200;ᦪ%ᵨN'ᦪreadDat()dᦪᐭᦪ#a$Hὃfᑴp'ᦪjsVal(),ᐸiY34p;ᦪḄᓟᦪḄᓝᦪḄា³:ᦪḄ;ᦪḄᦪ3Ꮤᦪᑣ´¤+st¡ᩩ-Ḅ;ᦪentdᦪᢥ¢9ᑮᜧḄ£Fᐭᦪ#b$ᨬ%ᵨᑏ'ᦪwriteDat()()entᦪ#b$ᔠᩩ-Ḅᦪ*+ᑮOUT.DATᦻ-$஺©ª4BᑖDEFᙠᦻ-progl.c$஺EF$«¬ᦪ#4a[200],b[200],«¬®4cnlHIᦋKᦪ/ᦻ-IN.DAT$Ḅ¯°ᦪ/ஹL'ᦪmain஺ஹN'ᦪreadDat஺@ᑏ'ᦪwriteDat()ḄᑁP஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsVal(){intij,thou,hun,ten,data;

362for(i=0;ib|j]){thou=b[i];b[i]=b|j];b|j]=thou;})voidreadDat()(inti;HLE*fp;fp=fopen("in.dat",nr");for(i=0;i

363”,ent);for(i=0;i

364");writeDat();)writeDat()(FILE*fp;inti;fp=fopen("out.datH,Hwu);fprintf(fp,"±d

365”,ent);for(i=0;i

366,',b[i]);fclose(fp);ਭ⚪`78ᦪ/ᦻ-IN.DAT$ᨵ200;ᦪ%ᵨN'ᦪreadDat஺d

367ᦪᐭᦪ#a$Hὃfᑴp'ᦪjsVal(),ᐸiY34¶p;ᦪḄᓟᦪḄᜧ::ᦪḄᦪḄᜧ::ᓝᦪḄᓝᦪḄᜧ::;ᦪḄᦪ3᜻ᦪᑣ´¤+st¡ᩩ-Ḅ;ᦪentdᦪᢥ¢9ᑮᜧḄ£Fᐭᦪ#b$ᨬ%ᵨᑏ'ᦪwriteDat()()entᦪ#b$ᔠᩩ-Ḅᦪ*+ᑮOUT.DATᦻ-$஺©ª4BᑖDEFᙠᦻ-progl.c$஺EF$«¬ᦪ#:a[200],b[200J,«¬®4entHIᦋKᦪ/ᦻ-IN.DAT$Ḅ¯°ᦪ/•ஹL'ᦪmain஺ஹN'ᦪreadDat஺@ᑏ'ᦪwriteDat஺ḄᑁP஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsValO{inti,j,thou,hun,ten,data;for(i=0;i=hun&&hun>=ten&&ten>=data&&a[i]%2)b[cnt++J=a[iJ;)for(i=0;ib[j]){thou=b[i];b[i]=b|j];b[j]=thou;}voidreadDat(){inti;FILE*fp;fp=fopen("in.dat","r");for(i=0;i

368n);writeDat();

369writeDat()(FILE*fp;inti;fp=fopen(nout.datn,"wu);fprintf(fp,n%d

370H,ent);for(i=0;i

371u,b[i]);fclose(fp);)ਭ⚪`79Hfᑏ'ᦪvoidcountValue(int*a,int*n),»ḄiY34k+1ᑮ1000{ᑁY7ᡈ11᦮◀½XYxy7ᡈ11᦮◀Ḅᡠᨵ᦮ᦪ0ᙠᦪ#a$¿ÀnvwdᦪḄ;ᦪ஺BᑖDEFᙠᦻ-progl.c$஺HIᦋKL'ᦪmain஺@*+ᦪ/'ᦪwriteDAT஺ḄᑁP஺#include#includevoidcountValue(int*a,int*n){inti;*n=0;for(i=l;i<=1000;i++)if(i%7==0&&i%11lli%7&&i%11==0)a[(*n)++]=i;main()(intaa[1000],n,k;clrscr();countValue(aa,&n);for(k=0;k

372H);elseprintf(H%5d",aa[k]);writeDAT();)writeDAT()intaa[1000],n,k;

373FILE*fp;fp=fopen("outl9.dat“Jw")UcountValue(aa,&n);for(k=0;k

374n);elsefprintf(fp/'%5dH,aa[k]);fprintf(fp,n

375u);fclose(fp);)⚪`80ᦪ/ᦻ-in.dat$ᨵ300;ᦪ%ᵨN'ᦪReadDat஺dᦪᐭᦪ#a$Hfᑴp'ᦪjsValue(),ᐸiY34k+;ᦪḄᦪÁᓟᦪḄᦪÁᦪḄᦪÁᦪḄᦪᜧ:Ḅ;ᦪent,k+ᡠᨵst¡ᩩ-ḄᦪÂᙳpjzl,Xst¡ᩩ-ḄᦪÂᙳpjz2,ᨬ%ᵨᑏ'ᦪwriteDat஺()*+ᑮout.datᦻ-஺Ã᝞41239,9-1-2-3>0,ᑣÄᦪstᩩ-¤¥Âᙳpjzl,;ᦪent=cnt+1஺8129,9-8-1-2<0,ᑣÄᦪXstᩩ-¤¥Âᙳpjz2஺BᑖDEFᙠᦻ-progl.c$஺EF$«¬ᦪ#4a[300],«¬®4cnt,pjzl,pjz2HIᦋKL'ᦪmain஺ஹN'ᦪReadDat()@ᑏ'ᦪwriteDat஺ḄᑁP஺#includeinta[300],cnt=0;doublepjz1=0.0,pjz2=0.0;jsValue(){intij,thou,hun,ten,data,n=0;for(i=0;i<300;i++){thou=a[i]/1000;hun=a[i]/100%10;ten=a[i]%100/10;data=a[i]%10;if(data-thou-hun-ten>0){cnt++;pjzl+=a[i];}else{n++;pjz2+=a[i];})if(cnt==0)pjz1=0;elsepjzl/=cnt;if(n==0)pjz2=0;elsepjz2/=n;)main()(inti;

376readDat();jsValue();writeDat();printf(ucnt=%d

377stᩩ-ḄÂᙳpzjl=%7.2f

378Xstᩩ-ḄÂᙳpzj2=%7.2t

379u,cnt,pjz1,pjz2);)readDat()(FILE*fp;inti;fp=fopen(Min.datn,Mrn);for(i=0;i<300;i++)fscanf(fpU'%dU',&a[i]);fclose(fp);}writeDat()(FILE*fp;inti;fp=fopen("out.dat*',nw");fprintf(fp,M%d

380%7.2f

381%7.2f

382",cnt,pjzl,pjz2);fclose(fp);ਮ⚪`81ᦪ/ᦻ-in.dat$ᨵ300;ᦪ%ᵨN'ᦪReadDat஺dᦪᐭᦪ#a$Hfᑴp'ᦪjsValue஺ᐸiY34k+ᓟᦪḄᦪᦪ:ᓝᦪḄᦪ;ᦪḄᦪḄ;ᦪent,k+ᡠᨵst¡ᩩ-ḄᦪÂᙳpjzl,Xst¡ᩩ-ḄᦪÂᙳpjz2,ᨬ%ᵨᑏ'ᦪwriteDat஺()*+ᑮout.datᦻ-஺Ã᝞47153,7+1=5+3,ᑣÄᦪstᩩ-¤¥Âᙳpjzl,;ᦪcnt=cnt+l08129,8+1<>2+9,ᑣÄᦪXstᩩ-¤¥Âᙳpjz2஺BᑖDEFᙠᦻ-progl.c$஺EF$«¬ᦪ#4a[300],«¬®4cnt,pjzl,pjz2஺HIᦋK.L'ᦪmain஺ஹN'ᦪReadDal()@ᑏ'ᦪwriteDal஺ḄᑁP஺#includeinta[300],cnt=0;doublepjzl=0.0,pjz2=0.0;jsValue(){inti,thou,hun,ten,data,n=O;

383for(i=0;i<300;i++){thou=a[i]/1000;hun=a[i]%1000/100;ten=ali]%100/10;data=a[i]%10;if(thou+hun==ten+data){cnt++;pjz1+=a[i];}else{n++;pjz2+=alij;})if(cnt==0)pjzl=0;elsepjzl/=cnt;if(n==0)pjz2=0;elsepjz2/=n;)main()(inti;readDat();jsVaIue();writeDat();printf("cnt=%d

384stᩩ-ḄÂᙳpzjl=%7.2f

385Xstᩩ-ḄÂᙳpzj2=%7.2f

386",cnt,pjzl,pjz2);)readDat()(FILE*fp;inti;fp=fopen("in.dat","r");for(i=0;i<300;i++)fscanf(fp,',%d,,',&a[i]);fclose(fp);)writeDat()(FILE*fp;inti;fp=fopen(Mout.dat","wn);fprintf(fp,H%d

387%7.2f

388%7.2f

389n,cnt,pjzl,pjz2);fclose(fp);)ਭ⚪`82ᦪ/ᦻ-in.dat$ᨵ300;ᦪ%ᵨN'ᦪReadDat஺dᦪᐭᦪ

390#a$Hfᑴp'ᦪjsValue஺ᐸiY34k+ᡠᨵdᦪ3ÇᦪḄ;ᦪent,k+ᡠᨵst¡ᩩ-ḄᦪÂᙳpjzl,Xst¡ᩩ-ḄᦪÂᙳpjz2,ᨬ%ᵨᑏ'ᦪwriteDat஺()cnt,pjzl,pjz2*+ᑮout.datᦻ-஺Ã᝞455913ÇᦪᑣÄᦪstᩩ-¤¥Âᙳpjzl,;ᦪcnt=cnt+L98123ÈÇᦪᑣÄᦪXstᩩ-¤¥Âᙳpjz2oBᑖDEFᙠᦻ-progl.c$஺EF$«¬ᦪ#4a[300],«¬®4cnt,pjzl,pjz2HIᦋKL'ᦪmain()^N'ᦪReadDat஺@ᑏ'ᦪwriteDat஺ḄᑁP஺#includeinta[3OOJ,cnt=O;doublepjzl=0.0,pjz2=0.0;intisP(intm){inti;for(i=2;i

391stᩩ-ḄÂᙳpzjl=%7.2f

392Xstᩩ-ḄÂᙳpzj2=%7.2f

393H,cnt,pjzl,pjz2);)readDat()

394FILE*fp;inti;fp=fopen("in.datH,nr");for(i=0;i<300;i++)fscanf(fp,n%dH,&a[i]);fclose(fp);)writeDat()(FILE*fp;inti;fp=fopen("out.dat',,"w");fprintf(fpU,%d

395%7.2f

396%7.2An",cnt,pjzhpjz2);fclose(fp);ਮ⚪`83Hfᑴ'ᦪReadDat஺ÉÊ¢ᦻ-IN.DAT$Nc1000;ᓝ|ᑴ᦮ᦪᑮᦪ#xx$UHfᑴ'ᦪCompute஺ᑖˤ¥HIxx$᜻ᦪḄ;ᦪodd,᜻ᦪḄÂᙳavel,ᏔᦪḄÂᙳave2ᡠᨵ᜻ᦪḄÌÍtotfcḄᨬ%ᵨ'ᦪWriteDat()()*+ᑮOUT.DATᦻ-$஺¤¥ÌÍḄÎ2᝞Ï4N2totfc=l/NE(xx[i]-avel)i=lÐNn᜻ᦪḄ;ᦪxx[i]n᜻ᦪaveln᜻ᦪḄÂᙳ஺.ᦪ/ᦻ-0Ḅ12345010;ᦪᵨ⌹?◞[஺(5;ᦪᙳᜧ:09::2000)BᑖDEFᙠᦻ-progl.c$஺HIᦋKL'ᦪmain()@*+ᦪ/'ᦪwriteDat஺ḄᑁP஺#include#include#include#defineMAX1000intxx[MAX],odd=0,even=0;doubleave1=0.0,ave2=0.0,totfc=0.0;voidWriteDat(void);intReadDat(void)

397inti;FILE*fp;if<(fp=fopen(HIN.DAT","rn))==NULL)return1;for(i=0;i

398H);)fclose(fp);return0;IvoidCompute(void){inti,yy[MAX];for(i=0;i

399");return;Compute();printf(,,ODD=%d

400AVEl=%f

401AVE2=%f

402TOTFC=%f

403,,,odd,avel,ave2,totfc);WriteDat();

404voidWriteDat(void)(FILE*fp;inti;fp=fopenC'OUT.DATnU'wn);fprintf(fp,,,%d

405%f

406%f

407%f

408,',odd,ave1,ave2,totfc);fclose(fp);)ਮ⚪`84Êᨵp;10;Ó100Ḅ⌱ἠᦪ/ᦻ-IN.DAT,ᐸᦪ/0Ḅ1235ᩩÖ×ḄØ7ᙳn10op⊤Úop;ÓḄ⌱$ÛÜor⊤Úor;ÓḄ⌱$ÛÜÝ¡Þß4ᑁPᙳn0@1,1⊤Ú¡Ó⌱$0⊤Ú¡Óà⌱$¶pá⌱ἠÓᦪᜧ:5;ÓyânãᦔḄ⌱ἠ஺å«'ᦪReadDat஺ḄiY3⌱ἠᦪ/Nᐭᑮᦪ#xx$஺Hfᑴ'ᦪCountRs஺ᩭ´¤5;ÓḄ⌱ἠᦪἠᦪÝçᐭyyèᑮyy[9]$஺()yy*+ᑮᦻ-OUT.DAT$஺BᑖDEFᙠᦻ-progl.c$஺HIᦋKL'ᦪmain஺ஹNᦪ/'ᦪReadDat஺@*+ᦪ/'ᦪwriteDat஺ḄᑁP஺#includecharxx[100][l1];intyy[10];intReadDat(void);voidWriteDat(void);voidCountRs(void){inti,j,count;for(i=0;i<100;i++){count=0;for(j=0;j<10;j++)if(xx[i][j]=='l')count++;if(count>5)continue;for(j=0;j<10;j++)if(xx[i][j]=='r)yy[j]++;))voidmain()

409inti;for(i=0;i<10;i++)yy[i]=O;if(ReadDat()){printiT⌱ἠᦪ/ᦻ-IN.DATXYᡭ[é

410\007”);return;)CountRs();WriteDat();intReadDat(void)(FILE*fp;inti;if((fp=fopen(,'IN.DATu,,'rn))==NULL)return1;for(i=0;i<100;i++){if(fgets(xx[iJ,12,fp)==NULL)return1;xx[i][10]='\0';)fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;fp=fopen(nOUT.DAT"4'w");for(i=0;i<10;i++){fprintf(fp,H%d

411M,yy[i]);printf("o±d;ÓḄ⌱ἠᦪ=%d

412”,i+l,yy[i]);Ifclose(fp);ਮ⚪`85ᦪ/ᦻ-IN.DAT$ᨵ200;ᦪ%ᵨN'ᦪreadDat஺dᦪᐭᦪ#a$Hὃfᑴp'ᦪjsVal(),ᐸiY34p;ᦪḄ;ᦪḄÁêᓟᦪ

413ḄÁêᦪḄᨬÁêᓝᦪḄ᝞)+Ḅᜧ::ᦪ3Ꮤᦪᑣ´¤ᵫst¡ᩩ-Ḅ;ᦪentdᦪᢥ¢9ᑮᜧḄ£Fᐭᦪ#b$ᨬ%ᵨᑏ'ᦪwriteDat()()entᦪ#b$ᔠᩩ-Ḅᦪ*+ᑮOUT.DATᦻ-$஺©ª4BᑖDEFᙠᦻ-progl.c$஺EF$«¬ᦪ#4a[200],b[200],«¬®4entHIᦋKᦪ/ᦻ-IN.DAT$Ḅ¯°ᦪ/ஹL'ᦪmain஺ஹN'ᦪreadDat஺@ᑏ'ᦪwriteDat஺ḄᑁP஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsVal(){inti,j,thou,hun,ten,data;for(i=0;i=0&&a[ij%2==0)b[cnt++]=a[i];)for(i=0;ib[j]){thou=b[i];b[i]=b[j];b[j]=thou;}voidreadDat()(inti;FILE*fp;fp=fopen("in.dat”JT“);for(i=0;i

414”,ent);for(i=0;i

415");writeDat();

416writeDat()(FILE*fp;inti;fp=fopen("out.dat","w");fprintf(fp,"%d

417",ent);for(i=0;i

418",b[i]);fclose(fp);)⚪`86ìᦪ/ᦻ-IN.DAT$ᨵ200;ᦪì%ᵨN'ᦪreadDat஺dᦪᐭᦪ#a$Hὃfᑴp'ᦪjsVal(),ᐸiY34ᓟᦪ@ᦪ!#ᡂp;Ḅᦪab(ᓝᦪḄᓝᦪ3ᦪḄᓟᦪᓝᦪḄ;ᦪ3ᦪḄᓝᦪ);ᦪ@ᦪ#ᡂ•;Ḅᓝᦪcd(ᓝᦪḄᓝᦪ3ᦪḄ;ᦪᓝᦪḄ;ᦪ3ᦪḄᦪ)᝞)#ᡂḄ;ᓝᦪab>cd,ab3ᏔᦪY5᦮◀cd3᜻ᦪxy;ᦪḄᓝᦪᙳXnᑣst¡ᩩ-Ḅᦪᢥ¢ᜧᑮ9Ḅ£Fᐭᦪ#b$⌕¤¥st¦ᩩ-ḄᦪḄ;ᦪcnt»ᨬmain஺'ᦪ%ᵨᑏ'ᦪwriteDat()()entᦪ#b$ᔠᩩ-Ḅᦪ*+ᑮOUT.DATᦻ-$஺©ª4BᑖDEFᙠᦻ-progl.c$஺EF$«¬ᦪ#4a[200],b[200],«¬®4entHIᦋKᦪ/ᦻ-IN.DAT$Ḅ¯°ᦪ/ஹL'ᦪmain஺ஹN'ᦪreadDat஺@ᑏ'ᦪwriteDat()ḄᑁP஺#include#defineMAX200inta[MAX],b[MAX],ent=0;voidjsVal(){intij,thou,hun,ten,data,ab,cd;for(i=0;i0&&(ab%2!=1&&ab%5==0)&&cd%2==1&&ab>=10&&cd>=10){b[cnt]=a[i];cnt++;})for(i=0;i

419voidreadDat()(inti;FILE*fp;fp=fopen("in.dat",nrn);for(i=0;i

420”,ent);for(i=0;i

421n,ent);for(i=0;i

422u,b[i]);fclose(fp);ਮ⚪`87ᦪ/ᦻ-in.dat$ᨵ300;ᦪ%ᵨN'ᦪReadDat஺dᦪᐭᦪ#a$Hfᑴp'ᦪjsValue஺ᐸiY34k+ᓟᦪḄᦪ;ᦪ:ᦪḄᦪᓝᦪḄᦪḄ;ᦪent,k+ᡠᨵst¡ᩩ-ḄᦪÂᙳpjzl,Xst¡ᩩ-ḄᦪÂᙳpjz2,ᨬ%ᵨᑏ'ᦪ()*+ᑮout.datᦻ-஺Ã᝞46712,6+2=7+1,ᑣÄᦪstᩩ-¤¥Âᙳpjzl,;ᦪcnt=cnt+l»8129,8+9<>1+2,ᑣÄᦪXstᩩ-¤¥Âᙳpjz2஺BᑖDEFᙠᦻ-progl.c$஺EF$«¬ᦪ#4a[300],«¬®4cnt,pjzl,pjz2஺HIᦋKL'ᦪmain஺ஹN'ᦪReadDat()@ᑏ'ᦪwriteDat஺ḄᑁP஺#includeinta[300],cnt=0;doublepjz1=0.0,pjz2=0.0;

423jsValue(){inti,gw,sw,bw,qw,cnt2=0;for(i=0;i<300;i++){gw=a[i]%10;sw=a[i]/10%10;bw=a[i]/100%10;qw=a[i]/1000;if((qw+gw)==(sw+bw)){cnt++;pjzl+=a[i];}else{cnt2++;pjz2+=a[i];})if(cnt==O)pjzl=O;elsepjzl/=cnt;if(cnt2==0)pjz2=0;elsepjz2/=cnt2;main()(inti;readDat();jsValue();writeDat();printf("cnt=%d

424stᩩ-ḄÂᙳpzjl=%7.2f

425Xstᩩ-ḄÂᙳpzj2=%7.2f

426",cnt,pjzl,pjz2);)readDat()(FILE*fp;inti;fp=fopen("in.datn,nrH);for(i=0;i<300;i++)fscanf(fpU'%dU\&a[i]);fclose(fp);)writeDat()(FILE*fp;inti;fp=fopen("out.dat","wH);fprintf(fp,n%d

427%7.2f

428%7.2f

429",cnt,pjzhpjz2);fclose(fp);

430⚪`88'ᦪReadDat()ÉÊ¢ᦻ-IN.DAT$NcpíîᦻᦻQᐭᑮᦪ#xx$Hfᑴ'ᦪSortCharAO,ᐸ'ᦪḄiY34nᓫᢥ¢9ᑮᜧḄ£F|᣸F᣸FḄ()ᢥ!ᐭᦪ#xx$ᨬ%ᵨ'ᦪwriteDat()()xx*+ᑮᦻ-OUT1.DAT$஺Ã:ᦻ4dAe,BfC.CCbbAA()4.ABCdefAACCbb.ᦪ/ᦻ-0Ḅ12345Ḅ67ᙳ9:80;<᪗>?@A1஺BᑖDEFᙠᦻ-progl.c$஺HIᦋKL'ᦪmain஺ஹNᦪ/'ᦪReadDat஺@*+ᦪ/'ᦪwriteDat()ḄᑁP஺#include#include#includecharxx[50][801;intmaxline=0;/*ᦻQḄRᦪ*/intReadDat(void);voidWriteDat(void);voidSortCharA(void){intij,k,strl;charch;for(i=0;ixx[i][k]){ch=xx[i][j]Uxx[i][j]=xx[i][k];xx[i][k]=ch;}))voidmain()(clrscr();if(ReadDat()){printf("ᦪ/ᦻ-IN.DATXYᡭ[!

431\007n);return;

432SortCharA();WriteDat();)intReadDat(void)(FILE*fp;inti=0;char*p;if((fp=fopen(,,IN.DAr,U'r,,))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[ij,,

433,);if(p)*p=O;i++U)maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;clrscr();fp=fopen("OUTl.DATu,"wu);for(i=0;i

434",xx[i]);fprintf(fp,n%s

435H,xx[i]);)fclose(fp);⚪`89ᦪ/ᦻ-IN.DAT$ᨵ200;ᦪ%ᵨN'ᦪreadDat஺dᦪᐭᦪ#a$Hὃfᑴp'ᦪjsVal(),ᐸiY34p;ᦪḄᓟᦪḄ;ᦪḄា³:ᦪḄᓝᦪḄᦪ3᜻ᦪᑣ´¤+st¡ᩩ-Ḅ;ᦪentdᦪᢥ¢9ᑮᜧḄ£Fᐭᦪ#b$ᨬ%ᵨᑏ'ᦪwrileDat()()entᦪ#b$ᔠᩩ-Ḅᦪ*+ᑮOUT.DATᦻ-$஺©ª4BᑖDEFᙠᦻ-progl.c$஺EF$«¬ᦪ#:a[200],b[200],«¬®4ent

436HIᦋKᦪ/ᦻ-IN.DAT$Ḅ¯°ᦪ/ஹL'ᦪmain஺ஹN'ᦪreadDat஺@ᑏ'ᦪwriteDat஺ḄᑁP஺#include#defineMAX200intalMAXJ,b[MAXJ,ent=0;voidjsVal()(inti,j,gw,sw,bw,qw;for(i=0;ib|jj){qw=b[i];b[i]=b[j];b[j]=qw;}voidreadDat(){inti;FILE*fp;fp=fopen(Hin.dat","r");for(i=0;i

437”,ent);for(i=0;i

438n);writeDat();)writeDat()(FILE*fp;inti;fp=fopen(nout.datn,"wu);

439fprintf(fp,n%d

440n,ent);for(i=0;i

441",b[i]);fclose(fp);ਭ⚪`90ÏᑡEFḄiY34pñ᦮ᦪFᑡ{K1,K2,...,K9}!᣸ᑡᡂp;ḄFᑡ஺Fᑡ$òK19ḄᦪóᙠK1Ḅô☢(☢)òK1ᜧḄᦪóᙠK1Ḅ☢(ö☢)஺⌕kfᑏ'ᦪjsValue஺ÉÊ¡iYᨬ%ᵨwriteDat஺'ᦪFᑡ*+ᑮᦻ-out.dat$஺÷ø4ᙠEF$å+ù10;Fᑡ5;Fᑡᨵ9;ñ᦮ᦪᐭᦪ#a[10][9]$ᑖËk+d10;Fᑡ஺Ã:Fú(){6,8,9,1,2,547,3}ü!᣸ᡂn{3,4,5,2,1,6,8,9,7)BᑖDEFᙠᦻ-progl.c$஺HIᦋKL'ᦪmain஺@ᑏ'ᦪwriteDat஺ḄᑁP஺#includejsValue(inta[10][9]){inti,j,k,val,num;for(i=0;i<10;i++){val=afi][0];for(j=0;j<9;j++)if(a[i]rjl0;k-)a[i][k]=a[i][k-l];a[i][0]=num;main()(inia[10][9]={{6,83,1,2,5,4,7,3},{3,5,8,9,1,264,7},{8,2,1,9,354,6,7},{3,5ý,2,9,8,6,7,4},{4,7,891,2,5,3,6},{4,7,3,5þ,2,6,8,9},(9,1,3,5,8,6,2,4,7),{2,6ý,9,8,3,5,7,4},{5,3,7,9,1,826,4},{7,1,325,8,9,4,6},)U

442inti,j;jsValue(a);for(i=0;i<10;i++){for(j=0;j<9;j++){printf("%d",alij[jj)Uif(j<=7)printf(",");)printf("

443");)writeDat(a);writeDat(inta[l0][9])[FILE*fp;inii,jUfp=fopen("out.dat","w");for(i=0;i<10;i++){for(j=0;j<9;j++){printf("%d",a[i][j]);fprintf(fp,"%d",a[i][j]);if(j<=7)fprintf(fp,",");)printf("

444");fprintf(fp,"

445");)fclose(fp);⚪`91HfᑴEFprogl.c,¢ᦻ-in.dat$Nc200;᦮ᦪᦪ#xx$k+᜻ᦪḄ;ᦪcntl@ᏔᦪḄ;ᦪcnt2ᦪ#xxÏ᪗nᏔᦪḄᐗḄᙳpj(ᶇ2ᦪ)஺cntl,cnt2,pjᑮout.dat஺ᑖஹᦪᦪread_dat(intxx[200])!"஺#include#include#defineN200voidread_dat(intxx[N])(inti,j;FILE*fp;

446fp=fopen(,'in.dat","rH);for(i=0;i<20;i++){for(j=0;j<10;j++){fscanf(fp,H%d,M,&xx[i*10+jJ);printf("%du,xx[i*10+j]);)printf(n

447H);)fclose(fp);)voidmain()(inti,j,sum;inicntl,cnt2,xx[N];floatpj;FILE*fw;clrscr();fw=fopen(',out.dat,',',wn);read_dat(xx);sum=0;pj=O.O;cntl=cnt2=0;for(i=0;i{if(xx[i]%2)cntl++;elsecnt2++;if(i%2==0){pj+=xx[i];sum++;})pj/=sum;printf(,'

448

449cntl=%d,cnt2=%d,pj=%6.2f

450,,,cntl,cnt2,pj);fprintf(fw,"%d

451%d

452%6.2f

453",cntl,cnt2,pj);fclose(fw);ਮ⚪%92&'ᑴprogl.c,)ᦻ+IN.DAT,200-᦮ᦪ/ᦪ0xx,2ᨬᜧᦪmaxᨬᜧᦪḄ-ᦪent5ᦪ0xx673᦮◀ᡈ677᦮◀Ḅᙳpj:ᶇ2ᦪ;஺

454max,ent,pjᑮOUT.DAT஺ᑖஹᦪᦪread_dat(intxx[200])!"஺#include#include#defineN200voidread_dat(intxx[NJ)(inti,j;FILE*fp;fp=fopen(,'in.datn,,'r");for(i=0;i<20;i-H-){for(j=0;j<10;j++){fscanf(fp,"

455,');)fclose(fp);)voidmain()(intm,temp,n,sum;intcnt,xx[Nl,max;floatpj;FILE*fw;clrscr();fw=fopen("out.dat,',,,wn);read_dat(xx);cnt=0;max=xx[0];pj=O.O;n=0;for(m=0;m

456printf(n

457

458max=%d,cnt=%d,pj=%6.2f

459",max,cnt,pj);fprintf(fw/'%d

460%d

461%6.2f

462",max,cnt,pj);fclose(fw);ਮ⚪%93&'ᑴᦪReadDat஺>?)ᦻ+IN.DAT,1000-ᓝAᑴ᦮ᦪᑮᦪ0xx=&'ᑴᦪCompute(),ᑖBCxx᜻ᦪḄ-ᦪodd,ᏔᦪḄ-ᦪeven,ᙳaverFGHtotfcḄIᨬJKᵨᦪWriteDat஺MᑮOUT.DATᦻ+஺CGHḄN᝞PQN2totfc=l/N£(xx[i]-aver)i=lRSᦪᦻ+TUḄVQWXTU10-ᦪIYᵨ⌹[◞]஺(W-ᦪᙳᜧ^஺_^`^2000)ᑖaTᙠᦻ+progl.c஺&cᦋefᦪmain()5ᦪᦪwriteDat஺Ḅᑁh஺#include#include#include#defineMAX1000intxx[MAX],odd=0,even=0;doubleaver=0.0,totfc=0.0;voidWriteDat(void);intReadDat(void)(inti;FILE*fp;if((fp=fopen(nIN.DAT","rn))==NULL)return1;/***************'ᑴᦪReadDat஺*****************/for(i=0;i

463n);)fclose(fp);return0;

464voidCompute(void){inti;for(i=0;i

465")=return;}Compute();printf(',ODD=%d

466OVEN=%d

467AVER=%f

468TOTFC=%f

469",odd,even,aver,totfc);WriteDat();voidWriteDat(void)(FILE*fp;inti;fp=fopen("OUT.DAT',=,wM);fprintf(fp,,,%d

470%d

471%f

472%f

473",odd,even,aver,totfc);fclose(fp);)⚪%94&'ᑴprogl.c,)ᦻ+in.dat,200-᦮ᦪ/ᦪ0xxI2᜻ᦪḄ-ᦪcntl

4745ᏔᦪḄ-ᦪcnt2Fᦪ0xxoᏔᦪḄᙳpj(ᶇ2ᦪ)஺cntl,cnt2,pjᑮout.dat஺ᑖஹᦪᦪread_dat(intxx|200])!"஺#include#include#defineN200voidread_dat(intxx[N])(inti,j;FILE*fp;fp=fopen("in.dat,,=,rM);for(i=0;i<20;i++){for(j=0;j<10;j++){fscanf(fp/'%d/',&xx[i*10+j]);printf(H%dn,xx[i*10+j]);)printf(,'

475,');)fclose(fp);voidmain()(intm,sum;intcntl,cnt2,xx[N];floatpj;FILE*fw;fw=fopen("out.dat,',',w");clrscr();read_dat(xx);cntl=0;cnt2=0;pj=O.O;for(m=0;m

476

477cnt1=%d,cnt2=%d,pj=%6.2f

478",cnt1,cnt2,pj);fprintf(fw,"%d

479%d

480%6.2f

481",cntl,cnt2,pj);

482fclose(fw);ਮ⚪%95ᦪReadDat஺>?)ᦻ+ENGIN,pqrᦻᦻsITᐭᑮuvwᦪ0xx=&'ᑴᦪencryptChar(),ᢥ"yḄz{ᐵ}~ᦪ0xxḄᡠᨵuvAXz{ITᐭᦪ0xxḄ~ḄIᨬJKᵨᦪWriteDat஺Mxxᑮᦻ+PS4.DA஺z{ᐵ}Qf(p)=p*lImod256(pVᦪ0p-uvḄASCIIIf(p)VCJuvḄASCII)I᝞CJf(p)^`^32ᡈf(p)~ḄuvVᜧᑏuIᑣuvlIᔲᑣf(p)ᡠ~ḄuvAXz{஺ᑖaTᙠᦻ+progl.c஺RSᦪᦻ+TUḄVQWXḄᙳ^80-uv஺&cᦋefᦪmain஺ஹᦪᦪReadDat஺5ᦪᦪWriteDat஺Ḅᑁh஺#include#include#include#includeunsignedcharxx[50]f80];intmaxline=0;/*ᦻsḄXᦪ*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j=for(i=0;i='A'&&xx[i]U]*ll%256v=Z)continue;elsexx[i][j]=xx[i][j]*l1%256;voidmain()(clrscr();if(ReadDat()){printf("ᦪᦻ+ENGINl6ᡭ]

483\007n);return;)encryptChar();WriteDat();

484intReadDat(void)FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("eng.in",Mru))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[ij,,

485,);if(p)*p=O;i++=1maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;fp=fopen("ps4.dat","w");for(i=0;i

486",xx[i]);fprintf(fp,,,%s

487,',xx[i]);)fclose(fp);ਮ⚪%96ᦪReadDat஺>?)ᦻ+ENGIN,pqrᦻᦻsITᐭᑮuvwᦪ0xx=&'ᑴᦪencryptChar(),ᢥ"yḄz{ᐵ}~ᦪ0xxḄᡠᨵuvAXz{ITᐭᦪ0xxḄ~ḄIᨬJKᵨᦪWriteDat஺Mxxᑮᦻ+PS5.DAT஺z{ᐵ}Qf(p)=p*llmod256(pVᦪ0p-uvḄASCIIIf(p)VCJuvḄASCH)I᝞RuvVᑏuᡈCJf(p)^`^32,ᑣuvlIᔲᑣf(p)ᡠ~ḄuvAXz{஺ᑖaTᙠᦻ+progl.c஺RSᦪᦻ+TUḄVQWXḄᙳ^80-uv஺&cᦋef:ᦪmain஺ஹᦪᦪReadDat஺5ᦪᦪWriteDat஺Ḅᑁh஺

488#include#include#include#includeunsignedcharxx[50][80];intmaxline=O;/*ᦻsḄXᦪ*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j=for(i=0;i='a'&&xx[iv='z')continue;elsexx[i][j]=xx[ij[jj*l1%256;)voidmain()(clrscr();if(ReadDat()){printf("ᦪᦻ+ENGINl6ᡭ]

489\007");return;}encryptChar();WriteDatO;)intReadDat(void)(FILE*fp;inti=0;unsignedchar*p;if((fp=fopen(Heng.in,',MrH))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],,

490,);if(p)*p=O;i++=)maxline=i;fclose(fp);

491return0;voidWriteDat(void)(FILE*fp;inti;fp=fopen("ps5.dat","w");for(i=0;i

492",xx[i]);fprintf(fp,"%s

493",xx[i]);}fclose(fp);)ਭ⚪%97ᦪReadDat஺>?)ᦻ+ENGIN,pqrᦻᦻsITᐭᑮuvwᦪ0xx=&'ᑴᦪencryptChar(),ᢥ"yḄz{ᐵ}~ᦪ0xxḄᡠᨵuvAXz{ITᐭᦪ0xxḄ~ḄIᨬJKᵨᦪWriteDat()Mxxᑮᦻ+PS9,DAT஺z{ᐵ}Qf(p)=p*llmod256(pVᦪ0p-uvḄASCIIIf(p)VCJuvḄASCII)I᝞RuvVᦪuuv0/9ᡈCJf(p)^`^32,ᑣuvlIᔲᑣf(p)ᡠ~ḄuvAXz{஺ᑖaTᙠᦻ+progLc஺RSᦪᦻ+TUḄVQWXḄᙳ^80-uv஺&cᦋefᦪmain஺ஹᦪᦪReadDat஺5HlᦪᦪWriteDat஺Ḅᑁh஺#include#include#include#includeunsignedcharxx[50][80];intmaxlineH);/*ᦻsḄXᦪᑓintReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j=for(i=0;i=I0,&&xx[i][j]<=,9,)continue;

494elsexx[i][jj=xx[ij[jj*l1%256;voidmain()(clrscr();if(ReadDat()){printf("ᦪᦻ+ENGINl6ᡭ]

495\007n);return;)encryptChar();WriteDatO;intReadDat(void)FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("eng.in","r,'))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i]An1)=if(p)*p=O;i++=Imaxline=i;fclose(fp);return0;IvoidWriteDat(void)FILE*fp;inti;fp=fopen(Hps9.dat","w");for(i=0;i

496",xx[i]);fprintf(fp,"%s

497”,xx[i]);fclose(fp);

498ਭ⚪%98ᦪReadDat஺>?)ᦻ+ENG.IN,pqrᦻᦻsITᐭᑮuvwᦪ0xx=&'ᑴᦪencryptChar(),ᢥ"yḄz{ᐵ}~ᦪ0xxḄᡠᨵuvAXz{ITᐭᦪ0xxḄ~ḄIᨬJKᵨᦪWriteDat஺Mxxᑮᦻ+PS3.DAT஺z{ᐵ}Qf(p)=p*17mod256(pVᦪ0■-uvḄASCIIIf(p)VCJuvḄASCH)I᝞CJf(p)^`^32ᡈᐸASCHV᜻ᦪIᑣuvlIᔲᑣf(p)ᡠ~ḄuvAXz{஺ᑖaTᙠᦻ+progl.c஺RSᦪᦻ+TUḄVQWXḄᙳ^80-uv஺&cᦋefᦪmain()>ᦪᦪReadDat()5ᦪᦪWriteDat஺Ḅᑁh஺#include#include#include#includeunsignedcharxx[50Jl80J;intmaxline=0;/*ᦻsḄXᦪ*/intReadDat(void);voidWriteDat(void);voidencryptChar(){inti,j=for(i=0;i

499\007");return;)encryptChar();WriteDat();)intReadDat(void)

500FILE*fp;inti=0;unsignedchar*p;if((fp=fopen("eng.in","ru))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i]An*);if(p)*p=O;i++=)maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;fp=fopen(',ps3.dat',,',w,');for(i=0;i

501",xx[i]);fprintf(fp,"%s

502",xx[i]);}fclose(fp);⚪%99!ᙠᦻ+IN.DATTᨵ100-├IW-├ᵫ{ṹdm:uv¡4;I¢£me:uv¡10;Iᓫ¥dj:᦮¡;Iᦪ¦si:᦮¡;I§¨je:©᦮¡;ªᑖ0ᡂ஺ᐸQ§¨=ᓫ¥*ᦪ¦C஺ᦪReadDat஺V,®100-├YTᐭ᪀ᦪ0sell஺&'ᑴᦪSortDat஺Iᐸ°6⌕2Qᢥ§¨)ᑮᜧAX᣸ᑡI´§¨µ`Iᑣᢥ{ṹ)ᑮᜧAX᣸ᑡIᨬ¶᣸ᑡTᐭ᪀ᦪ0sellIᨬJKᵨᦪWriteDat஺Mᑮᦻ+OUT1.DAT஺ᑖaTᙠᦻ+progl.c஺&cᦋefᦪmain஺ஹᦪᦪReadDat஺5ᦪᦪWriteDat஺Ḅᑁh஺#include#include#include#include

503#include#defineMAX100typedefstruct(chardm[5];/*{ṹ*/char¢£*/intdj;/*ᓫ¥*/intsi;/*ᦪ¦*/longje;/*§¨*/}PRO;PROsellLMAXJ;voidReadDatO;voidWriteDat();voidSortDat(){intij;PROxy;for(i=0;i<99;i++)for(j=i+l;jsell[j].jellsell[i].je==sell[j].je&&strcmp(sell[i].dm,sell[j].dm)>O){xy=sell[i];sell[i]=sell[j];sellfj]=xy;})voidmain()(memset(sell,0,sizeof(sell));ReadDat();SortDat();WriteDat();)voidReadDat()(FILE*fp;charstr[80],ch[l1];inti;fp=fopen(HIN.DAT"='r");for(i=0;i

504memcpy(ch,str+18,5);ch[5]=0;sell[i].sl=atoi(ch);sell[i].je=(long)sell[i].dj*sell[i].sl;)fclose(fp);)voidWriteDat()(FILE*fp;inti;fp=fopen(HOUTLDAT”,W);for(i=0;i<100;i++){printf(M%s%s%4d%5d%5d

505",sell[i].dm,sell[i].me,sell[i].dj,sell[i].sl,sell[i].je);fprintf(fp,”%s%s%4d%5d%5d

506",sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);)fclose(fp);)ਮ⚪%100ᦪReadDatO>?)ᦻ+IN.DAT,pqrᦻᦻsTᐭᑮuvwᦪ0xxI&'ᑴᦪChai€onvA(),ᐸᦪḄ°6VQFXoᓫMuvwḄᨬJp-uvḄASCII·¸4I¹⊡0J»ᨬJ¼½-uvḄASCIIIᑮᨬJp-ḄuvIᨬJ¼½-uvḄASCH·¸4I¹⊡0J»ᨬJ¼¾-uvḄASCIIIᑮᨬJ¼½-ḄuvI¿ÀÁÂpÃᜐᳮᑮ¼½-uvI¼p-uvḄASCII»RᨬJp-uvḄASCIIIᑮ¼•-ḄuvIᑮḄuvᑖBTUᙠRuvw~ḄᓃᨬJ!ᜐᳮḄuvwᢥXÈTᐭuvwᦪ0xxIᨬJKᵨᦪwriteDat()Mxxᑮᦻ+OUT10.DAT஺RSᦪᦻ+TUḄVQWXḄᙳ^80-uvIÉ᪗Ëv[5Ì஺ᑖaTᙠᦻ+progl.c஺&cᦋefᦪmain()5ᑏᦪwriteDat()Ḅᑁh஺#include#include#includecharxx[50][80];intmaxline=0;/*ᦻsḄXᦪ*/intReadDat(void);voidWriteDat(void);voidCharConvA()

507{inti,j;charp,c;for(i=0;iO;j—)xx[ij[j]=(xxlij|j]»4)+xx[ij[j-lj=xx[i][O]=p+c;))voidmain()(clrscr();if(ReadDat()){printf("ᦪᦻ+IN.DATl6ᡭ]!

508\007M);return;)CharConvA();WriteDat();intReadDat(void)(FILE*fp;inti=0;char*p;if((fp=fopen("IN.DAT",nrH))==NULL)return1;while(fgets(xx[i],80,fp)!=NULL){p=strchr(xx[i],,

509,);if(p)*p=O;i++=)maxline=i;fclose(fp);return0;)voidWriteDat(void)(FILE*fp;inti;

510fp=fopen(,'OUT10.DAT,'=,wu);for(i=0;i

511",xx[i]);fprintf(fp,',%s

512,,,xx[i]);)fclose(fp);

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
最近更新
更多
大家都在看
近期热门
关闭