Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int recurs(int N)
- {
- int l=0;
- if ((N==0) || (N%3==0) || (N%5==0))
- l=1;
- else
- recurs(N-5);
- return l;
- }
- int main ()
- {
- int N, b=0;
- cin >> N;
- N-=1;
- if (recurs(N)==1)
- cout << "yes";
- else cout << "no";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement