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

TOP

返回列表