返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<string.h>
  4. using namespace std;
  5. int main()
  6. {


  7.     char st[50];
  8.     cout<<"輸入一字串";
  9.     cin.getline(st,50);
  10.     strupr(st);  
  11.     cout<<"轉為大寫: "<<st<<endl;
  12.     strlwr(st);
  13.     cout<<"轉為小寫: "<<st<<endl;
  14.     system("pause");
  15.     return 0;   
  16. }
複製代碼

TOP

返回列表