Advertisement
social1986

Untitled

Jun 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 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 Max_Combination
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int begining = int.Parse(Console.ReadLine());
  14. int ending = int.Parse(Console.ReadLine());
  15. int stopNumber = int.Parse(Console.ReadLine());
  16. int counter = 0;
  17.  
  18. for (int i = begining; i <= ending; i++)
  19. {
  20. for (int a = begining; a <= ending; a++)
  21. {
  22. counter++;
  23. Console.Write($"<{i}-{a}>");
  24. if (counter == stopNumber)
  25. {
  26. break;
  27. }
  28. }
  29. if (counter == stopNumber)
  30. {
  31. break;
  32. }
  33. }
  34.  
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement