Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Heart
- {
- static void Main()
- {
- //Console.WriteLine("Enter size: ");
- //byte size = byte.Parse(Console.ReadLine());
- byte size = 16;
- char heart = '♥';
- for (byte i = 0; i <= size / 2 - i; i++)
- {
- if (i == 0)
- {
- Console.Write("{0}{1}{0}", new string(' ', size / 4), heart);
- Console.WriteLine("{0}{1}{0}", new string(' ', size / 4), heart);
- }
- else if (i != 0)
- {
- Console.Write("{0}{1}{2}{1}{0}", new string(' ', ((size / 4) - i)), heart, new string((' '), (i * 2) - 1));
- Console.WriteLine("{0}{1}{2}{1}{0}", new string(' ', ((size / 4) - i)), heart, new string((' '), (i * 2) - 1));
- }
- }
- for (byte a = 0; a < size / 2; a++)
- {
- Console.WriteLine("{0}{1}{2}{1}{0}", new string(' ', a + 1), heart, new string(' ', (size - a) - a - 2));
- }
- // 1: 2: 2:
- // @ @ @ @ 1 1
- // @ @ @ @ @ @ @ @ 2 2
- // @ @@ @ @ @ @ 123212321
- // @ @ @ @ 2
- // @ @ @ @ 3
- // @ @ @ @ 2
- // @@ @ 1
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment