Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 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. namespace _6_v3
  8. {
  9. class Program
  10. {
  11. static void Main()
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. int m = int.Parse(Console.ReadLine());
  15. char c = 'a';
  16. switch (m)
  17. {
  18. case 1:
  19. c = 'a';
  20. break;
  21. case 2:
  22. c = 'b';
  23. break;
  24. case 3:
  25. c = 'c';
  26. break;
  27. case 4:
  28. c = 'd';
  29. break;
  30. case 5:
  31. c = 'e';
  32. break;
  33. case 6:
  34. c = 'f';
  35. break;
  36. case 7:
  37. c = 'g';
  38. break;
  39. case 8:
  40. c = 'h';
  41. break;
  42. case 9:
  43. c = 'i';
  44. break;
  45. default:
  46. break;
  47. }
  48. for (int a = 1; a <= n; a++)
  49. {
  50. for (int s = 1; s <= n; s++)
  51. {
  52. for (char i = 'a'; i <= c; i++)
  53. {
  54. for (char q = 'a'; q <= c; q++)
  55. {
  56. for (int w = 1; w <= n; w++)
  57. {
  58. Console.Write($"{a}{s}{i}{q}{w} ");
  59. }
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement