返回列表 發帖
  1. #include<cstdlib>
  2. #include<iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int x,y=0,a,b;
  7.     cout<<"開始的數";
  8.     cin>>a;
  9.     cout<<"結束的數";
  10.     cin>>b;
  11.     for(x=a;x<=b;x++)
  12.     {
  13.      x%5==0?y++:y;
  14.     }
  15.     cout<<y;
  16.     system("pause");
  17.     return 0;   
  18. }
複製代碼

TOP

返回列表