#include
#include
#include
#define len 81
char
*s_gets
(char
*st,
int n)
;char
showmenu
(void);
void
eatline
(void);
// 讀取至行末尾
void
show
(void
(*fp)
(char*)
,char
*str)
;//函式指標 資料指標
void
toupper
(char*)
;// 把字串轉換為大寫
void
tolower
(char*)
;// 把字串轉換為小寫
void
transpose
(char*)
;// 大小寫轉置
void
dummy
(char*)
;// 不更改字串
intmain
(void
)strcpy
(copy, line)
;//為show()函式拷貝乙份,減少對原始資料的操作
show
(pfun, copy)
;//copy是陣列首位址,指向char型別值(相當於資料指標了)
}puts
("enter a string (empty line to quit):");
}puts
("bye!");
return0;
}char
showmenu
(void
)return ans;
}void
eatline
(void
)void
toupper
(char
*str)
}void
tolower
(char
*str)
}void
dummy
(char
*str)
void
transpose
(char
*str)
elseif(
isupper
(*str)
) str++;}
}void
show
(void
(*pfun)
(char*)
,char
*str)
char
*s_gets
(char
*st,
int n)
return ret_val;
}
字元大小寫轉換
題目1 寫乙個程式,要求功能 求出用1,2,5這三個數不同個數組合的和為100的組合個數。如 100個1是乙個組合,5個1加19個5是乙個組合 include using namespace std int func int num node string n,string i,char s,int...
字元大小寫的轉換
在python中有下面一堆內建函式,用來實現各種型別的大小寫轉化 看例子 a qiwsir,python a.upper 將小寫字母完全變成大寫字母 qiwsir,python a 原資料物件並沒有改變 qiwsir,python b a.upper b qiwsir,python c b.lowe...
大小寫字元轉換
include stdio.h include string.h include void inv char s void main a z 0x41 0x5a.小寫字元範圍為 a z 0x61 0x7a.可以發現,對應的大小寫字元之間的規律為,小寫字元比相應大寫字元大0x20,即10進製的32。所...