Advertisement
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 _5_Different_Numbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- var min = int.Parse(Console.ReadLine());
- var max = int.Parse(Console.ReadLine());
- if (max - min < 4)
- {
- Console.WriteLine("No");
- }
- for (int num1 = min; num1 <= max; num1++)
- {
- for (int num2 = min; num2 <= max; num2++)
- {
- for (int num3 = min; num3 <= max; num3++)
- {
- for (int num4 = min; num4 <= max; num4++)
- {
- for (int num5 = min; num5 <= max; num5++)
- {
- if (num1 < num2 && num2 < num3 && num3 < num4 && num4 < num5)
- {
- Console.WriteLine($"{num1} {num2} {num3} {num4} {num5}");
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement