Advertisement
Danvil

Лесенка б о й с

Feb 1st, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. namespace Лесенка
  2. {
  3.     class Program
  4.     {
  5.         static void drawL(int intN, char chX)
  6.         {
  7.             for (int i = 1; i != intN+1; i++)
  8.                 Console.Write(new string(chX, i)+"\n");
  9.         }
  10.         static void Main(string[] args)
  11.         {
  12.             int intN;
  13.             char chX;
  14.             Console.Write("Введите количество ступенек: ");
  15.             intN = int.Parse(Console.ReadLine());
  16.             Console.Write("Введите символ из которого будет состоять лесенка: ");
  17.             chX = char.Parse(Console.ReadLine());
  18.             drawL(intN, chX);
  19.             Console.ReadKey();
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement