返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<cstring>
  4. using namespace std;
  5. int main()
  6. {
  7.     string str;
  8.     string str;
  9.     cout<<"請輸入任意字串: ";
  10.     getline(cin,str);
  11.     cout<<"本字串的ASCII字元碼依序為:"<<endl;
  12.     for(int i=0; i<str.size(); i++)
  13.         cout<<int(str[i])<<endl;
  14.     system("pause");
  15.     return 0;   
  16. }
複製代碼

TOP

返回列表