Advertisement
Guest User

Untitled

a guest
Dec 16th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. class Program
  2. {
  3. static void Main(string[] args)
  4. {
  5. bool a;
  6. int[] tab = { 2, 4, 2 };
  7. //for (int i = 0; i < tab.Length; i++)
  8.  
  9. if (tab.Length >= 1 && tab[0] == tab[tab.Length - 1])
  10. {
  11. a = true;
  12. Console.WriteLine(SameFirstLast(tab, a));
  13. }
  14. else
  15. {
  16. a = false;
  17. Console.WriteLine(SameFirstLast(tab, a));
  18. }
  19. Console.ReadKey();
  20. }
  21.  
  22. static bool SameFirstLast(int[] tab, bool a)
  23. {
  24. return a;
  25. }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement