Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int i;
- bool simetric=true;
- int[] vec = { 1, 2, 5, 7, 7, 5, 2, 1 };
- for (i = 0; i < vec.Length / 2; i++)
- if (vec[i] != vec[vec.Length - 1 - i])
- {
- simetric = false;
- i = vec.Length;
- }
- if (simetric == true)
- Console.WriteLine("yes");
- else
- Console.WriteLine("no");
- Console.ReadLine();
Add Comment
Please, Sign In to add comment