Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 7th, 2013  |  syntax: C#  |  size: 0.50 KB  |  views: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.         public static bool IsThere(int[] arr, int num)
  2.         {
  3.             bool checker = false;
  4.             for (int i = 0; i < arr.Length; i++)
  5.                 if (arr[i] == num)
  6.                     checker = true;
  7.             else
  8.             return false;
  9.         }
  10.         public static void Main(string[] args)
  11.         {
  12.             int N = int.Parse(Console.ReadLine());
  13.             int[] array = new int[N];
  14.             Console.WriteLine(IsThere(array, int.Parse(Console.ReadLine())));