Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7.  
  8. namespace zad4._5
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. int[] tab1 = { 45, 57, 21, 12, 78, 49, 35,29,57 };
  15. int[] tab2 = new int [tab1.Length];
  16.  
  17. for (int i = 0; i <= tab2.Length - 1; i++)
  18. {
  19. if (i == 0)
  20. {
  21. tab2[i] = (tab1[tab1.Length - 1]);
  22. }
  23. else
  24. {
  25. tab2[i] = tab1[i - 1];
  26. }
  27. }
  28. foreach (int x in tab2)
  29. Console.Write("{0} ", x);
  30. Console.Read();
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement