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

  18.    
  19.      
複製代碼

TOP

返回列表