Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 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 ConsoleApplication30
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {int a = int.Parse(Console.ReadLine());
  13. int b = int.Parse(Console.ReadLine());
  14. int c = 0;
  15. for (int i1 = a; i1 <= b; i1++)
  16. {
  17. for (int i2 = a; i2 <= b; i2++)
  18. {
  19. for (int i3 = a; i3 <= b; i3++)
  20. {
  21. for (int i4 = a; i4 <= b; i4++)
  22. {
  23. for (int i5 = a; i5 <= b; i5++)
  24. {
  25. if (a <= i1 && i1 < i2 && i2 < i3 && i3 < i4 && i4 < i5 && i5 <= b)
  26. {
  27. Console.WriteLine("{0} {1} {2} {3} {4}", i1, i2, i3, i4, i5);
  28. c++;
  29. }
  30.  
  31. }
  32. }
  33. }
  34. }
  35. }
  36. if (c == 0)
  37. {
  38. Console.WriteLine("No");
  39. }
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. }
  48. }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement