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

正文內(nèi)容

c語言課程設(shè)計(字符串函數(shù)包)-閱讀頁

2025-02-02 14:06本頁面
  

【正文】 (第二個為:)。 puts(整個字符串拼接請按1,前幾個字符拼接請按2)。m)。 scanf(%d,amp。 if(h==1) { mystrcat(s2,s1)。 fprintf(fpout,拼接后的字符串為:%s\n,s2)。 printf(拼接后的字符串為:%s\n,s1)。} } if(m==2) { puts(請輸入需要拼接前幾個字符的值:)。g)。 scanf(%d,amp。 if(h==1) { mystrncat(s2,s1,g)。 fprintf(fpout,拼接后的字符串為:%s\n,s2)。 printf(拼接后的字符串為:%s\n,s1)。} } } if(n==5) { puts(...............歡迎進(jìn)入字符串中實際字符技術(shù)系統(tǒng)............ )。 scanf(%s,s1)。 fprintf(fpout,該字符長度為%d\n,mystrlen(s1))。 puts(請輸入字符串 :)。 puts(小寫轉(zhuǎn)大寫請按1,反之按2\n)。m)。 printf(轉(zhuǎn)換后的字符串為:%s\n,s1)。 } if(m==2) { mystrlow(s1)。 fprintf(fpout,轉(zhuǎn)換后的字符串為:%s\n,s1)。 printf(請輸入一個整數(shù):\n)。m)。 printf(轉(zhuǎn)換成的字符串為%s\n,s1)。 } if(n==8) { puts(...............歡迎進(jìn)入浮點數(shù)轉(zhuǎn)換成字符系統(tǒng)............ )。 scanf(%lf,amp。 my_itof(d,s1)。 fprintf(fpout,轉(zhuǎn)換成的字符串為%s\n,s1)。 printf(請輸入字符串:\n)。 printf(轉(zhuǎn)換后的10進(jìn)制為%d 8進(jìn)制%x16進(jìn)制%o\n,my_strtoi(s1)) 。 } if(n==10) { puts(...............歡迎進(jìn)入字符串統(tǒng)計系統(tǒng)............ )。 scanf(%s,s1)。 scanf(%s,s2)。 printf(出現(xiàn)次數(shù)為%d\n,count)。 } if(n==11) { puts(...............歡迎進(jìn)入字符串出現(xiàn)系統(tǒng)............ )。 scanf(%s,s1)。 scanf(%s,s2)。 printf(子串在第%d個字符開始出現(xiàn)\n,a)。 } if(n==12) { puts(...............歡迎進(jìn)入字符是否存在系統(tǒng)............ )。 scanf(%s,s1)。 scanf(%s,s2)。 fprintf(fpout,存在!)。 fprintf(fpout,不存在!)。 return 0。\039。amp。\039。 if(*s1*s2) return 1。 s2++。\039。amp。\039。 if(*s1==39。amp。 *s2!=39。) return 1。\039。amp。\039。 } int mystrncmp(char *s1,char *s2,int g) //字符串前幾個字符的比較 { int i=1。\039。amp。\039。amp。 if(*s1*s2) return 1。 s2++。 } } void mystrcpy(char *s1,char *s2) //字符串的復(fù)制 { while(*s2!=39。) { *s1=*s2。 s2++。\039。 while(*s2!=39。amp。 i++=g) { *s1=*s2。 s2++。\039。\039。} while(*s2!=39。) { *s1=*s2。s2++。\039。 while(*s1!=39。) {s1++。\039。amp。s1++。} *s1=39。} int mystrlen (char*s)//字符串的長度 { int c=0。\039。 s++。 }char *my_itoa(int a,char *s)//整數(shù)轉(zhuǎn)換到字符串{ int t,i,b。 for(i=0。i++) { t=a%10。 a=a/10。\039。b=i/2+1。 s[b1]=s[i1]。 }} if(i%2==0){ for(b=1。b++,i) { str=s[a1]。 s[i1]=str。} char * my_itof(double d, char* str) //浮點數(shù)轉(zhuǎn)換成字符串{ char str1[40]。 int index=0。 unsigned long num。39。 } // 判斷小數(shù)點位置 for (i=0。 i++) { if (d = 1) { d = d / 10。 } else if (d ) { d = d * 10。 } else break。 i7。 num = (unsigned long)(d + )。039。 } if (dotPos 1) { str[index++] = 39。 str[index++] = 39。 for (i=0。 i++) str[index++] = 39。 for (i=0。 i++) str[index++] = str1[j1i]。 idotPos。 str[index++] = 39。 for (。 i++) str[index++] = str1[j1i]。039。 index++。.39。.39。 str[++index] = 39。 return(str)。 while(s[i]!=39。){ s[i]=s[i]48。}}int my_strtoi(char *s) //字符串轉(zhuǎn)換成整數(shù){ int a,h=0。\039。039。 s++。} void mystrlow(char*s) //大寫字符變小寫{ while(*s!=39。) { if(*s=39。amp。 *s=39。) { *s+=32。 }}void mystrupr(char*s) //小寫字符變大寫{ while(*s!=39。) { if(*s=39。amp。 *s=39。) { *s=32。 }} int mystrstrcount(char*s1,char*s2) //統(tǒng)計字符串中指定某子串出現(xiàn)的次數(shù){ int len2=mystrlen(s2)。 int i,j,count1=0,count2=0。i+len2len1。jlen2。 } if(count1==len2) count2++。 } return count2。 int len1=mystrlen(s1)。 for(i=0。i++,count1=0) { for(j=0。j++) { if(*(s1+i+j)==*(s2+j)) count1++。 }}char *mystrptr(char *s1,char *s2)//判斷字符串中是否存在指定字符{ char *p。\039。 while(*p!=39。) { if(*s1==*p) { return(char*)s1。 } s1++。 }42
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1