Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static bool IsThere(int[] arr, int num)
- {
- bool checker = false;
- for (int i = 0; i < arr.Length; i++)
- if (arr[i] == num)
- checker = true;
- else
- return false;
- }
- public static void Main(string[] args)
- {
- int N = int.Parse(Console.ReadLine());
- int[] array = new int[N];
- Console.WriteLine(IsThere(array, int.Parse(Console.ReadLine())));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement