- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- char str[100];
- int ASCIII,ASCII;
- cout <<"請輸入ASCII碼範圍(0~127):"<<endl ;
- cout <<"起始值"<<endl;
- cin >> ASCIII;
- cout <<"終止值"<<endl;
- cin >> ASCII;
- cin.getline(str,100);
- cout <<"所得字串"<< endl;
- for(int i = ASCIII;i<=ASCII;i++)
- cout <<char(i) << endl;
-
-
- system("pause");
- return 0;
- }
複製代碼 |