Advertisement
SvetoslavUzunov

Untitled

Apr 9th, 2021
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. using System;
  2.                    
  3. public class Program
  4. {
  5.     static void Main(){
  6.        
  7.         var a=3;
  8.         var b=7;
  9.        
  10.         int n1=a, n2=n1+1, n3=n2+1, n4=n3+1;
  11.         var count=0;
  12.         for(; n1<=n2; n1++){
  13.             for(; n2<=n3; n2++){
  14.                 for(;n3<=n4;n3++){
  15.                     for(;n4<=b;n4++){
  16.                         Console.WriteLine($"{n1} {n2} {n3} {n4}");
  17.                         count++;
  18.                     }
  19.                 }
  20.             }
  21.         }
  22.         Console.WriteLine(count);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement