Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Max_Combination
- {
- class Program
- {
- static void Main(string[] args)
- {
- int begin = int.Parse(Console.ReadLine());
- int end = int.Parse(Console.ReadLine());
- int stop = int.Parse(Console.ReadLine());
- int counter = 0;
- for (int i = begin; i <= end; i++)
- {
- if (counter == stop)
- {
- break;
- }
- for (int k = begin; k <= end; k++)
- {
- Console.Write("<{0}-{1}>", i, k);
- counter++;
- if (counter==stop)
- {
- break;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment