Krasimir_Slavov

Untitled

Mar 6th, 2019
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace Lab_Arr_Repeat_String
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int n = int.Parse(Console.ReadLine());
  11.             string result = " ";
  12.  
  13.             StringRepeat(result, n);
  14.             Console.Write(result);
  15.         }
  16.  
  17.         private static string StringRepeat(string result, int n)
  18.         {
  19.             for (int i = 0; i < n; i++)
  20.             {
  21.                 result = new string(' ', n);
  22.             }
  23.             return result;
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment