freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

全國(guó)計(jì)算機(jī)等級(jí)考試三級(jí)c語(yǔ)言程序設(shè)計(jì)上機(jī)考試習(xí)題集(20xx年版(文件)

 

【正文】 ll[i].mc,str+4,10)。 memcpy(ch,str+18,5)。 } fclose(fp)。 for(i=0。 } fclose(fp)。請(qǐng)編制函數(shù)SortDat(),其功能 要求:按產(chǎn)品代碼從小到大進(jìn)行排列,若產(chǎn)品代碼相等,則按金額從大到小進(jìn)行排列,最終排列結(jié)果仍存入結(jié)構(gòu)數(shù)組 sell中,最后 調(diào)用函數(shù) WriteDat()把結(jié)果輸出到文件 中。 /*產(chǎn)品代 碼 */ char mc[11]。 /*金額 */ }PRO。 void SortDat() {int I,j。I++) for(j=I+1。sell[I].jesell[j].je) {xy=sell[I]。 ReadDat()。 char str[80],ch[11]。i100。 memcpy(ch,str+14,4)。ch[5]=0。 } void WriteDat() { FILE *fp。i100。 } ***************************題目 14(無(wú)憂 id 151 題 ) 已知數(shù)據(jù)文件 中存有全國(guó)計(jì)算機(jī)等級(jí)考試三級(jí) C 語(yǔ)言程序設(shè)計(jì)上機(jī)考試習(xí)題集( 20xx 年版)【終極無(wú)錯(cuò)版】 9 200 個(gè)四位數(shù),并已調(diào)用讀函數(shù)readDat()把這些數(shù)存入數(shù)組 a中,請(qǐng)考生編制一函數(shù)jsVal(),其功能是:依次從數(shù)組a 中取出一個(gè)四位數(shù),如果該四位數(shù)連續(xù)大于該四位數(shù)以后的五個(gè)數(shù)且該數(shù)是奇數(shù)(該四位數(shù)以后不滿五個(gè)數(shù),則不統(tǒng)計(jì)),則統(tǒng)計(jì)出滿足此條件的個(gè)數(shù) t 并把這些四位數(shù)按從小到大的順序存入數(shù)組 b 中,最后調(diào)用寫(xiě)函數(shù) writeDat( )把結(jié)果t 以及數(shù)組 b 中符合條件的四位數(shù)輸出到 文件中。 void jsVal() {int I,j,flag。j=I+5。 else {flag=0。} } for(I=0。j++) if(b[I]b[j]) {flag=b[I]。 FILE *fp 。 i++) fscanf(fp, %d, amp。 readDat() 。 i t 。 } writeDat() { FILE *fp 。 for(i = 0 。 } ***************************題目 15(無(wú)憂 id 150 題 ) 已知數(shù)據(jù)文件 中存有200 個(gè)四位數(shù),并已調(diào)用讀函數(shù)readDat()把這些數(shù)存入數(shù)組 a中,請(qǐng)考生編制一函數(shù)jsVal(),其功能是:若一個(gè)四位數(shù)的千位數(shù)字上的值小于等于百位數(shù)字上的值,百位數(shù)字上的值小于等于十位數(shù)字上的值,以及十位數(shù)字上的值小于等于個(gè)位數(shù)字上的值,并且原四位數(shù)是偶數(shù),則統(tǒng)計(jì)出滿足此條件的個(gè)數(shù) t 并把這些四位數(shù)按從小到大的順序存入 數(shù)組 b中,最后調(diào)用寫(xiě)函數(shù) writeDat()把結(jié)果 t 以及數(shù)組 b 中符合條件的四位數(shù)輸出到 文件中。 void jsVal() {int I,j。I++) {qw=a[I]/1000。 if((qw=bw)amp。(sw=gw)amp。It1。b[I]=b[j]。 fp = fopen(, r) 。a[i]) 。 jsVal() 。 i++) printf(%d , b[i]) 。 int i 。 i t 。最后把已處理的字符串仍按行重新存入字符串?dāng)?shù)組 xx 中,最后調(diào)用函數(shù)writeDat()把結(jié)果 xx 輸出到文件 中。 include include include char xx[50][80]。 void StrCharJR() {int i,j。jstrlen(xx[i])。 return。 int i=0。\n39。 } maxline=i。 int i。imaxline。 } ***************************題目 17 函數(shù) READDAT()實(shí)現(xiàn)從文件 中讀取一篇英文文章存入到字符串?dāng)?shù)組 XX 中 。 include include include char xx[50][80] 。 void ChA(void) { int i,j。i++) { ch=xx[i][0]。 xx[i][strlen(xx[i])1]+=ch。 return 。 int i = 0 。\n39。 } maxline = i 。 int i 。 i maxline 。 } ***************************題目 18(無(wú)憂 id 1 題 ) 函數(shù) ReadDat()實(shí)現(xiàn)從文件 中讀取一篇英文文章,存入到字符串?dāng)?shù)組 xx 中;請(qǐng)編制函數(shù) encryptChar(),按給定的替代關(guān)系對(duì)數(shù)組 xx 中的所有字符進(jìn)行替代,仍存入數(shù)組 xx 的對(duì)應(yīng)的位置上,最后調(diào)用函數(shù)WriteDat()把結(jié)果 xx 輸出到文件 中。 請(qǐng)勿改動(dòng)主函數(shù) main()、讀數(shù)據(jù)函數(shù) ReadDat()和輸出數(shù)據(jù)函數(shù) WriteDat()的內(nèi)容。 void WriteDat(void)。i++) for(j=0。 } void main() { clrscr()。 WriteDat()。 if((fp=fopen(,r))==NULL) return 1。 if(p)*p=0。 return 0。 for(i=0。 } fclose(fp)。 注意:部分源程序存在文件 中。 while ( *str ) {p=str。 } else break。 str++。 clrscr() 。 gets(substr) 。 printf(n=%d\n, n) 。 FILE *rf, *wf 。 } ReadWrite() { char str[81], substr[3], ch。 puts(substr) 。 gets(str) 。 } main() { char str[81], substr[3] 。\039。 while(*r) if(*r==*p) { r++。 include include include int findStr(char *str,char *substr) { int n=0。例如,假定輸入的字符串為 asd asasdfg asd as zx67 asd mklo,子字符串為 as,函數(shù)返回值是6。i++){ printf(%s\n,xx[i])。 int i。 } maxline=i。\n39。 int i=0。 return。j++) if(xx[i][j]*11%256=32||xx[i][j]%2==0) continue。 for(i=0。 int maxline=0。 部分源程序存在文件 中。 fprintf(fp, %s\n, xx[i]) 。 fp = fopen(, w) 。 return 0 。 if(p) *p = 0 。 if((fp = fopen(, r)) == NULL) return 1 。 WriteDat() 。 } } void main() { clrscr() 。jstrlen(xx[i])1。 for(i=0。 /* 文章的總行數(shù) */ int ReadDat(void) 。最后把已處理的字符串逆轉(zhuǎn)后按行重新存入字符串?dāng)?shù)組 XX 中 ,最 后調(diào)用函數(shù)WRITEDAT()把結(jié)果 XX 輸出到文件 中 .原始數(shù)據(jù)文件存放的格式是 :每行的寬度均小于 80 個(gè)字符 ,含標(biāo)點(diǎn)符號(hào)和空格 . 注意:部分源程序已給出。 fprintf(fp,%s\n,xx[i])。 fp=fopen(,w)。 return 0。 if(p)*p=0。 if((fp=fopen(,r))==NULL) return 1。 WriteDat()。 } void main() { clrscr()。imaxline。/*文章的總行數(shù) */ int ReadDat(void)。 部分源程序存在文件 中。 fclose(fp) 。 fprintf(fp, %d\n, t) 。 writeDat() 。 for(i = 0 。 } void main() { int i 。 i MAX 。} } void readDat() { int i 。jt。(a[I]%2==0)) b[t++]=a[I]。(bw=sw)amp。 sw=a[I]%100/10。 for (I=0。 程序中已定義數(shù)組:a[200], b[200],已定義變量:t 請(qǐng)勿改動(dòng)數(shù)據(jù)文件 中的任何數(shù)據(jù)、主函數(shù) main()、讀函數(shù) readDat()和寫(xiě)函數(shù)writeDat()的內(nèi)容。 i++) fprintf(fp, %d\n, b[i]) 。 fp = fopen(, w) 。 printf(\n) 。 printf(滿足條件的數(shù) =%d\n, t) 。 fclose(fp) 。 for(i = 0 。b[j]=flag。I++) for(j=I+1。} if(flag==1) {b[t]=a[I]。amp。IMAX5。 程序中已定義數(shù)組:a[200], b[200],已定義變量:t 請(qǐng)勿改動(dòng)數(shù)據(jù)文件 中的任何數(shù)據(jù)、主函數(shù) main()、讀函數(shù) readDat()和寫(xiě)函數(shù)writeDat()的內(nèi)容。 fprintf(fp,%s %s %4d %5d %5d\n, sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je)。 fp=fopen(,w)。 sell[i].je=(long)sell[i].dj*sell[i].sl。 sell[i].dj=atoi(ch)。 memcpy(sell[i].dm,str,4)。 fp=fopen(,r)。 WriteDat()。sell[j]=xy。j++) if(strcmp(sell[I].dm,sell[j].dm)0||strcmp(sell[I].dm,sell[j].dm)==0amp。 for(I=0。 void ReadDat()。 /*單價(jià) */ int sl。 請(qǐng)勿改動(dòng)主函數(shù) main()、讀數(shù)據(jù)函數(shù) ReadDat()和輸出數(shù)據(jù)函數(shù) WriteDat()的內(nèi)容。其中:金額 =單價(jià) *數(shù)量計(jì)算得出。i++){ printf(%s %s %4d %5d %5d\n,sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je)。 int i。 sell[i].sl=atoi(ch)。ch[4]=0。i++){ fgets(str,80,fp)。 int i。 SortDat()。sell[I]=sell[j]。j100。 PRO xy。 PRO sell[MAX]。 /*產(chǎn)品名稱 */ int dj。 部分源程序存在文件 中。 } ***************************★ 題目 12(無(wú)憂 id 78 題 ) 已知在文件 中存有 100個(gè)產(chǎn)品銷售記錄,每個(gè)產(chǎn)品銷售記錄由產(chǎn)品代碼 dm(字符型 4位 ),產(chǎn)品名稱 mc(字符型 10位 ),單價(jià) dj(整型 ),數(shù)量 sl(整型 ),金額 je(長(zhǎng)整型 )五部分組成。 chg(a) 。 wf = fopen(, w) 。 } void readwriteDAT() { int i 。 chg(a)。 printf(Enter a string : )。s++。amp。s++。amp。 s++。z39。 注意:部分源程序存在文件 文件中。 } ***************************題目 11(無(wú)憂 id
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1