返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int s,e;
  7.     cout<<"請輸入ASCII碼範圍(0~127)"<<endl;
  8.     cout<<"起始值:";
  9.     cin>>s;
  10.     cout<<"終止值:";
  11.     cin>>e;
  12.     cout<<"所得字串:"<<endl;
  13.     for(int i=s;i<=e;i++)
  14.     {
  15.           cout<<char(i);
  16.     }
  17.     cout<<endl;
  18.     system("pause");     
  19.     return 0;   
  20. }
複製代碼

TOP

返回列表