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

TOP

返回列表