Advertisement
MeehoweCK

Untitled

Aug 19th, 2019
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. bool f(int n, int a, int b, int c)
  6. {
  7.     if(n % a == 0)
  8.         return true;
  9.     if(n % b == 0)
  10.         return true;
  11.     if(n % c == 0)
  12.         return true;
  13.     return false;
  14. }
  15.  
  16. int main()
  17. {
  18.     cout << f(17, 2, 3, 7) << endl;
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement