Advertisement
_MuradPro_

Untitled

Jan 7th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.14 KB | None | 0 0
  1. public static boolean isIn(int n, int d) {
  2.         while(n>0)
  3.         {
  4.             if(n%10 == d)
  5.                 return true;
  6.             else
  7.                 n /= 10;
  8.         }
  9.         return false;
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement