Zhaniartt

Untitled

Nov 22nd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. using System;
  2.  
  3. namespace FootbalChange
  4. {
  5. class MainClass
  6. {
  7. public static void Main(string[] args)
  8. {
  9. int num = int.Parse(Console.ReadLine());
  10. int counter = 0;
  11.  
  12. for (char i = 'B'; i <= 'L'; i++)
  13. {
  14. for (char k = 'f'; k >= 'a'; k--)
  15. {
  16. for (char n = 'A'; n <= 'C'; n++)
  17. {
  18. for (int m = 1; m <= 10; m++)
  19. {
  20. for (int l = 10; l >= 1; l--)
  21. {
  22. counter++;
  23.  
  24. if (counter == num && i % 2 ==0)
  25. {
  26. Console.WriteLine($"Ticket combination: {i}{k}{n}{m}{l}");
  27. Console.WriteLine($"Prise: {i+k+n+m+l} lv.");
  28. break;
  29. }
  30. }
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment