Problem Statement:
To find whether anyone integer value is present in another integer value. If anyone integer is present in another integer then display true or else display false.
Two integer numbers are given as 'a' and 'b'.
Ex1:
a=1212 b=12, Output: True
Ex2:
a=20 b=2309, Output: False
Explanation:
- Find the smallest number.
- Calculate the length of the smallest number "b" and multiply it by 10 as "len".
- In a while loop, "rem" is the modular division(remainder value) of the largest integer "a" and length of the smallest integer "len".
- If the "rem" and the "b"(smallest integer) are the same then, break the loop and return true or else return false at the end.
0 Comments