Advertisement
Bob103

C#_3_(V-7)

Sep 29th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. class Program
  2.     {
  3.  
  4.          static void func(int c, int n)
  5.         {
  6.             if (c > n)
  7.                 return;
  8.             for (int i = c; i > 0; i--)
  9.                 Console.Write(i + " ");
  10.             Console.WriteLine();
  11.             func(c + 1, n);
  12.         }
  13.  
  14.         static void Main(string[] args)
  15.         {
  16.             Console.Write("Введите 1 значение: ");
  17.             int a = Convert.ToInt32(Console.ReadLine());
  18.             Console.Write("Введите последнее значение: ");
  19.             int b = Convert.ToInt32(Console.ReadLine());
  20.             func(a, b);
  21.            
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement