返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<string>  
  4. using namespace std;
  5. int main()
  6. {
  7.    char s[50];
  8.    cout<<"輸入一字串:";
  9.    cin.getline(s,50);
  10.    cout<<"你剛輸入的字串是:"<<s<<endl;
  11.    strupr(s);
  12.    cout<<"轉換為大寫:"<<s<<endl;
  13.    strlwr(s);
  14.    cout<<"轉換為小寫: "<<s<<endl;
  15.    system("pause");
  16.    return 0;
  17. }
複製代碼

TOP

返回列表