Advertisement
wingman007

PineTree

Sep 16th, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1.             // Pine Tree
  2.             Console.WriteLine("Pine Tree");
  3.             int size = 80;
  4.             for (i = 0; i < size; i++)
  5.             {
  6.                 if (i % 2 == 0) continue;
  7.                 for (int k = (size - i) / 2; k > 0; k--)
  8.                 {
  9.                     Console.Write(" ");
  10.                 }
  11.                 for (int j = 0; j < i; j++)
  12.                 {
  13.                     Console.Write("*");
  14.                 }
  15.                 Console.WriteLine();
  16.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement