Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int[] a = new int[100];
- int n, isPalindrom = 1;
- n = Convert.ToInt32(Console.ReadLine());
- for(int i = 0; i < n; i++)
- a[i] = Convert.ToInt32(Console.ReadLine());
- for (int i = 0; i < n && isPalindrom == 1; i++)
- if (a[i] != a[n - i - 1])
- isPalindrom = 0;
- if (isPalindrom == 0) Console.WriteLine("Nu");
- else Console.WriteLine("Da");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement