Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.         string row = new string('o', n).Replace("o", "* ").Substring(0, 2 * n - 1);
  9.         RepeatTimes(n, () => Console.WriteLine(row));
  10.     }
  11.  
  12.     public static void RepeatTimes(int Count, Action action)
  13.     {
  14.         for (int i = 0; i < Count; i++)
  15.         {
  16.             action();
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement