using System;
public class Program
{
private static bool check_digit_exists(int n, int digit) {
while (n > 0) {
if (digit == n % 10) {
return true;
}
n = n / 10;
}
return false;
}
public static void Main(string[] args)
{
int num = 230138;
Console.WriteLine(check_digit_exists(num, 2));
Console.Write(check_digit_exists(num, 5));
}
}
/*
run:
True
False
*/