Guest User

Untitled

a guest
Apr 26th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1.             int i;
  2.             bool simetric=true;
  3.             int[] vec = { 1, 2, 5, 7, 7, 5, 2, 1 };
  4.             for (i = 0; i < vec.Length / 2; i++)
  5.                 if (vec[i] != vec[vec.Length - 1 - i])
  6.                 {
  7.                     simetric = false;
  8.                     i = vec.Length;
  9.                 }
  10.             if (simetric == true)
  11.                 Console.WriteLine("yes");
  12.             else
  13.                 Console.WriteLine("no");
  14.             Console.ReadLine();
Add Comment
Please, Sign In to add comment