Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- string row = new string('o', n).Replace("o", "* ").Substring(0, 2 * n - 1);
- RepeatTimes(n, () => Console.WriteLine(row));
- }
- public static void RepeatTimes(int Count, Action action)
- {
- for (int i = 0; i < Count; i++)
- {
- action();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement