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

正文內(nèi)容

08年9月上機最新整理-文庫吧資料

2024-08-30 14:53本頁面
  

【正文】 } } totPjz/=totCnt。 if (data%2==0) { totCnt++。 if(xx[i]0) totNum++。iMAXNUM。 } 答案: { int i,data。 fprintf(fp, %d\n%d\n%.2lf\n, totNum, totCnt, totPjz)。 } void WriteDat(void) { FILE *fp。 } fclose(fp)。 while(! feof(fp)) { 17 fscanf(fp, %d, amp。 int i = 0。 Writedat()。 printf(符合條件的正整數(shù)的個數(shù) = %d 個 \n, totCnt)。 } CalValue()。 if(ReadDat()) { printf(數(shù)據(jù)文件 !\007\n)。 i MAXNUM。 clrscr()。 void Writedat(void)。 /* 符合條件的正整數(shù)的個數(shù) */ double totPjz = 。 int totNum = 0。 請勿改動主函數(shù) main()、讀函數(shù) ReadDat()和寫函數(shù) WriteDat()的內(nèi)容。請編制函數(shù)CalValue(),其功能要求:( 1)求出該文件中共有多少個正整數(shù) totNum;( 2)求這些數(shù)右移 1位后,產(chǎn)生的新數(shù)是偶數(shù)的數(shù)的個數(shù) totCnt,以及滿足此條件的這些數(shù)(右移前的值)的算術(shù)平均值 totPjz,最后調(diào)用函數(shù) WriteDat()把所求的結(jié)果輸出到文件 。 } } return k。 16 k++。 data=dataten*10。 data=ihun*100。i++) { j=10。 for(i=100。 } 答案: { int i,j,k=0。 i++) fprintf(out, %d\n, b[i])。 for(i = 0。 out = fopen(, w)。 } writeDat(int num, int b[]) { FILE *out。 num = jsValue(b)。 請勿改動主函數(shù) main()和寫函數(shù) writeDat()的內(nèi)容。 最后調(diào)用函數(shù) writeDat()把結(jié)果輸出到文件 。 } 12. 下列程序的功能是:在 3位整數(shù)( 100至 999)中尋找符合下面條件的整數(shù),并依次從小到大存入數(shù)組 b中;它既是完全平方數(shù),又有兩位數(shù)字相同,例如144, 676等。 xy=sqrt((double)xy)。amp。in。 int i。 fclose(wf)。 15 s = countValue(1000)。 float s。 } progReadWrite() { FILE *wf。 printf(自然數(shù)之和的平方根 =%f\n, countValue(1000))。 請勿改動主函數(shù) main()和輸入輸出函數(shù) progReadWrite()的內(nèi)容。 例如,若 n為 1000時,函數(shù)值應為 s=。} return fn。f2=fn。 fn=f1+f2。 fclose(out)。 printf(%d,s)。 out = fopen(, w)。 } writeDat() { FILE *in, *out。 printf(n=%d, f=%d\n, n, jsValue(n))。 試題程序: include 14 int jsValue(int t) { } main() { int n。 注意:部分源程序已給出。 } } } 10. 編寫函數(shù) jsValue(), 它的功 能是求 Fibonacci數(shù)列中大于 t的最小的一個數(shù) , 結(jié)果由函數(shù)返回 , 其中 Fibonacci數(shù)列 F(n)的定義為 : F(0)=0, F(1)=1 F(n)=F(n1)+F(n2) 最后調(diào)用函數(shù) writeDat(), 把結(jié)果輸出到文件 。 else *pf=*pf*11%256。i++) { pf=xx[i]。 for(i=0。 } 答案: {int i。 fprintf(fp, %s\n, xx[i])。 i maxline。 fp = fopen(, w)。 } void WriteDat(void) { FILE *fp。 fclose(fp)。 i++。)。 while(fgets(xx[i], 80, fp) !=NULL) { p = strchr(xx[i], 39。 unsigned char *p。 } 13 int ReadDat(void) { FILE *fp。 } encryptChar()。 if(ReadDat()) { printf(數(shù)據(jù)文件 !\n\007)。 void WriteDat(void)。 int maxline = 0。 請勿改動主函數(shù) main()、讀函數(shù) ReadDat()和寫函數(shù) WriteDat()的內(nèi)容。 替代關(guān)系: f(p)=p*11 mod 256( p是數(shù)組 xx中某一個字符的 ASCII值, f(p)是計算后新字符的 ASCII值),如果原字符的 ASCII值是偶數(shù)或計算后 f(p)的值小于等于 32,則該字符不變,否則將 f(p)所對應的字符進行替代。 } } 9. 函數(shù) ReadDat() 的功能是實現(xiàn)從文件 , 存入到字符串數(shù)組 xx中。jstr1。i++) {str1=strlen(xx[i])。 for(i=0。 } fclose(fp)。 i++) { printf(%s\n, xx[i])。 for(i = 0。 clrscr()。 12 } void WriteDat(void) { FILE *fp。 fclose(fp)。 i++。)。 while(fgets(xx[i], 80, fp) !=NULL) { p = strchr(xx[i], 39。 char *p。 } int ReadDat(void) { FILE *fp。 } StrCharJR()。 if(ReadDat()) { printf(數(shù)據(jù)文件 !\n\007)。 void WriteDat(void)。 int maxline = 0。 請勿改動主函數(shù) main()、讀函數(shù) ReadDat()和寫函數(shù) WriteDat()的內(nèi)容。 原始數(shù)據(jù)文件存放的格式是:每行的寬度均小于 80個字符,含標點符號和空格。} } 8. 函數(shù) ReadDat() 的功能是實現(xiàn)從文件 xx中;請編制函數(shù) StrCharJP(),該函數(shù)的功能是:以行為單位把字符串中的所有字符的 ASCII值右移 4位,然后把右移后的字符的 ASCII值再加上原字符的 ASCII值,得到新的字符,并存入原字符串對應的位置上。b[i]=b[j]。jt。it1。t++。} if (a[i]%2==0) flag=0。 else {flag=0。j=i+5。iMAX5。 int k。 fclose(fp)。 i t。 fprintf(fp, %d\n, t)。 int i。 writeDat()。 i++) printf(%d , b[i])。 for(i = 0。 jsVal()。 } main() { int i。a[i])。 i MAX。 fp = fopen(, r)。 void jsVal() { } void readDat() { int i。 試題程序: include define MAX 200 int a[MAX], b[MAX], t = 0。 程序中已定義數(shù)組: a[200], b[200],已定義變量: t。} } 7. 已知 200個 4位數(shù),并已調(diào)用讀函數(shù) readDat()把這些數(shù)存入數(shù)組 a中,請編制一函數(shù) jsVal(),其功能是:依次從數(shù)組 a中取出一個數(shù),如果該 4位數(shù)連續(xù)大于該 4位數(shù)以后的 5個數(shù)且該數(shù)是奇數(shù),則統(tǒng)計出滿足此條件的數(shù)的個數(shù) t,并把這些 4位數(shù)按從小到大的順序存入數(shù)組 b中,最后調(diào)用寫函數(shù) writeDat() 把結(jié)果 t及數(shù)組 b中符合條件的 4位數(shù)輸 出到 。sell[i]=sell[j]。sell[j]=xy。j++) if(strcmp(sell[i].mc,sell[j].mc)0) {xy=sell[i]。i++) for(j=i+1。 for(i=0。 } 答案: {int i,j。 i++) { fprintf(fp, %s %s %4d %5d %10ld\n, sell[i].dm, sell[i].mc, sell[i].dj,sell[i].sl, sell[i].je)。 for(i = 0。 int i。 } fclose(fp)。 sell[i].sl = atoi(ch)。 memcpy(ch, str +18, 5)。 ch[4] = 0。 memcpy(sell[i].mc, str + 4, 10)。 i++) { fgets(str, 80, fp)。 for (i = 0。 int i。 } void ReadDat() { FILE *fp。 9 SortDat()。 void SortDat() { } main() { memset(sell, 0, sizeof(sell))。 void ReadDat()。 /* 金額 */ } PRO。 /* 單價 */ int sl。 /*產(chǎn)品代碼 */ char mc[11]。 請勿改動主函數(shù) main()、讀函數(shù) ReadDat()和寫函數(shù) WriteDat()的內(nèi)容。請編制函數(shù) SortDat(),其功能要求:按產(chǎn)品名稱從小到大進行排列,若產(chǎn)品名稱相同,則按金額從小到大進行排列,最終排列結(jié)果仍存入結(jié)構(gòu)數(shù)組 sell中,最后調(diào)用函數(shù) WriteDat()把結(jié)果輸出到文件 。其中:金額 =單價數(shù)量。) xx[i][j]+=1。 xx[i][j]=39。 amp。 else if(xx[i][j]=39。) xx[i][j]=39。j++) if(xx[i][j]==39。 for(j=0。imaxline。 } 答案: {int i,j,str。 fprintf(fp, %s\n, xx[i])。 i maxline。 8 fp = fopen(, w)。 int i。 return 0。 } maxline = i。 if(p) *p = 0。\n39。 if((fp = fopen(, r)) == NULL) return 1。 int i =0。 WriteDat()。 return。 void ConvertCharA(void) { } main() { clrscr()。/* 文章的總行數(shù) */ int ReadDat(void)。 試題程序: include include include char xx[50][80]。 注意:部分源程序已給出。把已處理的字符串仍按行重新存入字符串數(shù)組 xx中,最后調(diào)用函數(shù) WriteDat()把結(jié)果 xx輸出到文件 。請編制函數(shù) ConvertCharA(),該函數(shù)的功能是:以行為單位把字符串中的所有小寫字母改寫成該字母的下一個字母,如果是字母 z,則改寫成字母 a。 pf++。 while(*pf!=0) {if(*pf*11%256130 || *pf*11%256=32) 。imaxline。 char *pf。 } fclose(fp)。 i++) { printf(%s\n, xx[i])。 for(i = 0。 int i。 return 0。 } maxline = i。 if(p) *p = 0。\n 39。 if((fp = fopen(, r)) ==NULL) r
點擊復制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1