返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<string>
  4. using namespace std;
  5. int main()
  6. {
  7.     string king;
  8.     cout<<"任意輸入字串"<<endl;
  9.     getline(cin,king);
  10.     cout<<"本字串長度為"<<king.size()<<"個字元"<<endl;
  11.     system("pause");
  12.     return 0;
  13. }
複製代碼

TOP

返回列表