返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. void wave(int start,int end)
  5. {
  6.     for(int i=start;i<=end;i++)
  7.     {
  8.         cout<<i<<endl;
  9.     }
  10. }
  11. int main()
  12. {
  13.     int start;int end;
  14.     cout<<"from:"<<endl;
  15.     cin>>start;
  16.     cout<<"to:"<<endl;
  17.     cin>>end;
  18.     wave(start,end);
  19.     system("pause");
  20.     return 0;
  21. }
複製代碼

TOP

返回列表