Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 27.
- public static void Print(int n)
- {
- if (n == 1)
- Console.WriteLine("*");
- else
- {
- Print(n - 1);
- for (int i = 0; i < n; i++)
- {
- Console.Write("*");
- }
- Console.WriteLine();
- }
- }
- 28.
- public static void Print(int n)
- {
- if (n == 1)
- Console.WriteLine("*");
- else
- {
- for (int i = 0; i < n; i++)
- {
- Console.Write("*");
- }
- Console.WriteLine();
- Print(n-1);
- for (int i = 0; i < n; i++)
- {
- Console.Write("*");
- }
- Console.WriteLine();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement