Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Diagnostics.Tracing;
- namespace КоледнаШапка
- {
- class Program
- {
- static void Main(string[] args)
- {
- var beginig = int.Parse(Console.ReadLine());
- var end = int.Parse(Console.ReadLine());
- var maxCount = int.Parse(Console.ReadLine());
- var counter = -1;
- for (var one = beginig; one <= end; one++)
- {
- for (var two = beginig; two <= end; two++)
- {
- counter++;
- if (counter >= maxCount)
- {
- continue;
- }
- Console.Write($"<{one}-{two}>");
- }
- }
- }
- }
- }
- // Максимален брой комбинации
- // 69
- // 71
- // 100
- // <69-69><69-70><69-71><70-69><70-70><70-71><71-69><71-70><71-71>
Advertisement
Add Comment
Please, Sign In to add comment