返回列表 發帖
  1. #include<iostream>
  2. #include<cstblib>
  3. using namespace std;

  4. bool check(int x,int k)

  5. {
  6.      
  7.     if(x%k==0)
  8.        return true;
  9.      else
  10.      {
  11.         while(x>0)
  12.         {
  13.            if(x%10==k)
  14.                return true
  15.             x=x/10      
  16.         }
  17.            
  18.      }
  19.      
  20. }
  21. int main(){
  22.     system("pause");
  23.     return 0;
  24. }
複製代碼

TOP

返回列表