Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp7
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9.  
  10. int x = Convert.ToInt32(Console.ReadLine());
  11. int y = Convert.ToInt32(Console.ReadLine());
  12. funkcja1(x, y);
  13. char[] tab = new char[8] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h' };
  14. funkcja2(tab);
  15.  
  16.  
  17.  
  18. }
  19.  
  20.  
  21. public static void funkcja1 (int x, int y)
  22. {
  23. if (x>y)
  24. {
  25. Console.WriteLine(x);
  26. }
  27. else
  28. {
  29. Console.WriteLine(y);
  30. }
  31. }
  32. public static void funkcja2(char [] tab)
  33. {
  34. Array.Reverse(tab);
  35. for (int i = 0; i < tab.Length; i=i+2)
  36. {
  37. Console.Write(tab[i]+" ");
  38. }
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement