Advertisement
blazarow09

Untitled

Apr 28th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. namespace BankNumberGenerator
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. int p1 = int.Parse(Console.ReadLine());
  11. char p2 = char.Parse(Console.ReadLine());
  12. char p3 = char.Parse(Console.ReadLine());
  13. char p4 = char.Parse(Console.ReadLine());
  14. int p5 = int.Parse(Console.ReadLine());
  15. int max = int.Parse(Console.ReadLine());
  16.  
  17. int counter = 0;
  18.  
  19. for (int i = p1; i <= 99; i++)
  20. {
  21. for (int j = p2; j <= 'Z'; j++)
  22. {
  23. for (int k = p3; k <= 'z'; k++)
  24. {
  25. for (int l = p4; l <= 'Z'; l++)
  26. {
  27. for (int m = p5; m <= 10; m++)
  28. {
  29. if (i % 10 == 2 && m % 10 == 5)
  30. {
  31. counter++;
  32. Console.WriteLine($"{i}{j}{k}{l}{m}");
  33.  
  34. if (counter == max)
  35. {
  36. return;
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement