Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean isIn(int n, int d) {
- while(n>0)
- {
- if(n%10 == d)
- return true;
- else
- n /= 10;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement