Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- bool a;
- int[] tab = { 2, 4, 2 };
- //for (int i = 0; i < tab.Length; i++)
- if (tab.Length >= 1 && tab[0] == tab[tab.Length - 1])
- {
- a = true;
- Console.WriteLine(SameFirstLast(tab, a));
- }
- else
- {
- a = false;
- Console.WriteLine(SameFirstLast(tab, a));
- }
- Console.ReadKey();
- }
- static bool SameFirstLast(int[] tab, bool a)
- {
- return a;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement