Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace Recursion
- {
- class Program
- {
- static void Main(string[] args)
- {
- var number = int.Parse(Console.ReadLine());
- Print(number);
- }
- static void Print(int index)
- {
- if (index <= 0)
- {
- return;
- }
- Console.WriteLine(new string ('*', index));
- Print(index - 1);
- Console.WriteLine(new string('#', index));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment