返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<string>
  4. using namespace std;
  5. int main()
  6. {
  7.     int o,m;
  8.     //char str[100];
  9.     cout<<"請在此輸入ascii碼範圍(0~127): ";
  10.     /*cin.getline(str,127);
  11.      cout<<"此字串的ASCII字元碼依序為:"<<endl;*/
  12.      cout<<"起始值"<<endl;
  13.      cin>>o;
  14.      cout<<"終止值"<<endl;
  15.       cin>>m;
  16.       for(int i=o;i<=m;i++)
  17.       {
  18.       cout<<char(i)<<" ";
  19.             
  20.       }
  21.     system("pause");     
  22.     return 0;   
  23. }
複製代碼

TOP

返回列表