Advertisement
AnastasiyaG

Untitled

Dec 29th, 2019
990
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Password
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int a = int.Parse(Console.ReadLine());
  10. int b = int.Parse(Console.ReadLine());
  11. int max = int.Parse(Console.ReadLine());
  12. int counter = 0;
  13. int i = 35;
  14. int j = 64;
  15.  
  16.  
  17.  
  18. while (i <=55)
  19. {
  20. while(j <= 96)
  21. {
  22. for (int k =1; k<= a; k++)
  23. {
  24. for (int l = 1; l <=b; l++)
  25.  
  26.  
  27.  
  28. {
  29. char one = ((char)i);
  30. char two = ((char)j);
  31.  
  32.  
  33. Console.Write($"{one}{two}{k}{l}{two}{one}|");
  34. counter += 1;
  35. i++;
  36. j++;
  37.  
  38.  
  39. if (counter >= max)
  40. {
  41. return;
  42.  
  43. }
  44. else if (i > 55)
  45. { i = 35; }
  46. else if (j > 96)
  47. { j = 64; }
  48. else if (k == a && l == b)
  49. { return;
  50. }
  51. }
  52.  
  53. }
  54.  
  55. }
  56.  
  57. }
  58.  
  59.  
  60. }
  61. }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement