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

正文內(nèi)容

05年南開上機100題-全文預(yù)覽

2024-09-20 01:47 上一頁面

下一頁面
  

【正文】 include include include include include define MAX 100 typedef struct{ char dm[5]。函數(shù) ReadDat()是讀取這 100個銷售記錄并存入結(jié)構(gòu)數(shù)組 sell中。 } fclose(rf) 。 i 50 。 FILE *rf, *wf 。 puts (a)。 printf(The original string is : )。 } main( ) { char a[N]。amp。y39。a39。||s[i]==39。 for(I=0。 注意:部分源程序存在文件 文件中。 } ☆ 題目 11(字符串字母移位題 ) 程序 :把 s 字符串中的所有字母改寫成該字母的下一個字母,字母 z改寫成字母 a。imaxline。 int i。 } maxline=i。\n39。 int i=0。 return。y39。a39。z39。imaxline。/*文章的總行數(shù) */ int ReadDat(void)。 部分源程序存在文件 。 } ★☆ 題目 10(替換字符題 ) 函數(shù) ReadDat()實現(xiàn)從文件 中讀取一篇英文文章存入到字符串數(shù)組 xx 中,請編制函數(shù) ConvertCharA(), 其函數(shù)的功能是:以行為單位把字符串中的所有小寫字母改寫成該字母的下一個字母,如果是字母 z,則改寫成字母 a。imaxline。 } void WriteDat(void) { FILE *fp。 i++。 while(fgets(xx[i],80,fp)!=NULL){ p=strchr(xx[i],39。 } int ReadDat(void) { FILE *fp。 if(ReadDat()){ printf(數(shù)據(jù)文件 ! \n\007)。k++) if(xx[i][j]xx[i][k]) {ch=xx[i][j]。 for(j=0。 char ch。 int maxline=0。 例:原文: dAe,BfC. CCbbAA 結(jié)果: fedCBA. bbCCAA 原始數(shù)據(jù)文件存放的格式是:每行的寬度均小于 80個字符,含標點符號和空格。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]*11%256130) continue。 for(i=0。 int maxline=0。(注意中間變量用無符號整型),部分源程序存在文件 。 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()。 /*單價 */ int sl。 請勿改動主函數(shù) main()、讀數(shù)據(jù)函數(shù) ReadDat()和輸出數(shù)據(jù)函數(shù) WriteDat()的內(nèi)容。其中:金額 =單價 *數(shù)量計算得出。 i++){ printf(i=%d,%d\n,i+1,bb[i])。 clrscr()。aa[i])。 in=fopen(,r)。 writeDat()。i10。aa[i]aa[j]) {data=aa[i]。i++) for(j=i+1。 include include include int aa[200],bb[10]。請編制函數(shù) jsSort(),其函數(shù)的功能是:要求按每個數(shù)的后三位的大小進行降序排列,然后取出滿足此條件的前 10個數(shù)依次存入數(shù)組b 中,如果后三位的數(shù)值相等,則按原先的數(shù)值進行升序排列。 fprintf(out,%d\n,bb[i])。 out=fopen(,w)。 fclose(in)。 for(i=0。 writeDat()。i10。aa[i]aa[j]) {data=aa[i]。i++) for(j=i+1。 include include include int aa[200],bb[10]。請編制函數(shù) jsSort(),其函數(shù)的功能是:要求按每個數(shù)的后三位的大小進行升序排列,然后取出滿足此條件的前 10個數(shù)依次存入數(shù)組bb中,如果后三位的數(shù)值相等,則按原先的數(shù)值進行降序排列。 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()。m++) str[s++]=xx[i][j+m]。 } if(!isalpha(xx[i][j])) str[s++]=39。 else { for(m=1。 s=k=0。 for(i=0。/*文章的總行數(shù) */ int ReadDat(void)。 部分源程序存在文件 。 } fclose(fp) 。 for(i = 0 。 } void WriteDat(void) { FILE *fp 。 i++ 。 while(fgets(xx[i], 80, fp) != NULL) { p = strchr(xx[i], 39。 } int ReadDat(void) { FILE *fp 。 if(ReadDat()) { printf(數(shù)據(jù)文件 !\n\007) 。) tem[k++]=xx[i][s]。 for(s=0。) {righto=j。j) { k=0。 for(i=0。 /* 文章的總行數(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。gw%2==0) b[t++]=a[i]。bw%2==0amp。 if(qwamp。i++) { qw=a[i]/1000。 include define MAX 200 int a[MAX], b[MAX], t = 0 。 } ☆ 題目 2 已知數(shù)據(jù)文件 中存有 200個四位數(shù),并已調(diào)用讀函數(shù) readDat()把這些數(shù)存入數(shù)組 a中,請考生編制一函數(shù) jsVal(),其功能是:如果四位數(shù)各位上的數(shù)字均是 0或 2或 4或 6或 8,則統(tǒng)計出滿足此條件的個數(shù) t,并把這些四位數(shù)按從大到小的順序存入數(shù)組 b中。m++)fprintf(wf,%d ,xx[m])。n)。 for(i=0。 } void readwriteDat() { int m,n,xx[1000], i。mn。m,amp。} } main() { int m,n,xx[1000]。 for(m=m+1。im。 請勿改動主函數(shù) main()和寫函數(shù) writeDat()的內(nèi)容。 ☆ 題目 1 請編寫一 個函數(shù) jsValue(int m,int k,int xx[]),該函數(shù)的功能是:將大于整數(shù) m且緊靠 m的 k個素數(shù)存入數(shù)組 xx傳回。幾點說明: 題目標題號前用 “☆” 顯示的是 2020 年 4 月份本人根據(jù)各大論壇考生聵的題號集中而來,題號前加 “★” 為 2020 年 9月上機考試題,其中難免有題型相同而題號增加的現(xiàn)象,此類標明,僅供參考。 個別南開題如 5 100 題,題目與原書有所不同,是按實際考試的題目所來,并對今年在實際上機中出現(xiàn)的考題,用紅色部分表示實際上機題中的注明事項。 例如:若輸入 17 5 則應(yīng)輸出: 19, 23, 29, 31, 37。 for(i=2。 } void num(int m,int k,int xx[]) { int s=0。 k。 scanf(%d%d,amp。 for(m=0。 readwriteDat()。 wf=fopen(,w)。m,amp。mn。 fclose(wf)。 程序中已定義數(shù)組: a[200], b[200],已定義變量: t 請勿改動數(shù)據(jù)文件 、主函數(shù) main()、讀函數(shù) readDat()和寫函數(shù) writeDat()的內(nèi)容。iMAX。 gw=a[i]%10。amp。amp。i++) for(j=i+1。 b[j]=qw。 for(i = 0 。 fclose(fp) 。 printf(滿足條件的數(shù) =%d\n, t) 。 printf(\n) 。 fp = fopen(, w) 。 i++) fprintf(fp, %d\n, b[i]) 。 原 始數(shù)據(jù)文件存放的格式是:每行的寬度均小于 80個字符,含標點符號和空格。 int maxline = 0 。 char tem[80]。j=0。o39。s++) tem[k++]=xx[i][s]。o39。 } } void main() { clrscr() 。 WriteDat() 。 if((fp = fopen(, r)) == NULL) return 1 。 if(p) *p = 0 。 return 0 。 fp = fopen(, w) 。 fprintf(fp, %s\n, xx[i]) 。 例如:原文: You He Me I am a student. 結(jié)果: Me He You student a am I 原始數(shù)據(jù)文件存放的格式是:每行的寬度均小于 80個字符,含標點符號和空格。 int maxline=0。 char str[80]。 memset(str,0,80)。j) { if(isalpha(xx[i][j])) k++。 k=0。m=k。 strcpy(xx[i],str)。 } StrOL()。 char *p。)。 fclose(fp)。 clrscr()。i++){ printf(%s\n,xx[i])。函數(shù) ReadDat()讀取這 200個數(shù)存放到數(shù)組 aa中。 請勿改動主函數(shù) main()、讀數(shù)據(jù)函數(shù) ReadDat()和輸出數(shù)據(jù)函數(shù) WriteDat()的內(nèi)容。i199。amp。} for(i=0。 jsSort()。 in=fopen(,r)。aa[i])。 clrscr()。 i++){ printf( %d,bb[i])。函數(shù) ReadDat()讀取這 200個數(shù)存放到數(shù)組 aa中。 請勿改動主函數(shù) main()、讀數(shù)據(jù)函數(shù) ReadDat()和輸出數(shù)據(jù)函數(shù) WriteDat()的內(nèi)容。i199。amp。} for(i=0。 jsSort()。 int i。 i++) fscanf(in,%d,amp。 int i。 i10。 } ☆ 題目 7(結(jié)構(gòu)體操作題 ) 已知在文件 中存有 100個產(chǎn)品銷售記錄,每個產(chǎn)品銷售記錄由產(chǎn)品代碼 dm(字符型 4位 ),產(chǎn)品名稱 mc(字符型 10 位 ),單價 dj(整型 ),數(shù)量 sl(整型 ),金額 je(長整型 )五部分組成。 部分源程序存在文件 。 /*產(chǎn)品名稱 */ int dj。 PRO sell[MAX]。 PRO xy。j1
點擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1