Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = int.Parse(Console.ReadLine());
- int width = (4 * number) - 4;
- int spacesTimes = width - 4;
- int kriloTimes = 1;
- // cycle 1
- for (int c1 = 1; c1 <= number - 2; c1++)
- {
- string spaces = new string(' ', spacesTimes);
- string kriloRight = string.Join("", Enumerable.Repeat("/*", kriloTimes));
- string kriloLeft = string.Join("", Enumerable.Repeat("*\\", kriloTimes));
- string total = kriloLeft + spaces + kriloRight;
- kriloTimes++;
- spacesTimes-=4;
- Console.WriteLine(total);
- }
- string middleUp = string.Join("", Enumerable.Repeat("\\/", (width / 2)));
- string middleDown = string.Join("", Enumerable.Repeat("/\\", (width / 2)));
- Console.WriteLine(middleUp);
- //cycle 2
- for (int c2 = 1; c2 <= number / 2; c2++)
- {
- string arrowLeft = new string('<', (width - 6) / 2);
- string arrowRight = new string('>', (width - 6) / 2);
- string total = arrowLeft + "*|**|*" + arrowRight;
- Console.WriteLine(total);
- }
- Console.WriteLine(middleDown);
- //cycle 3
- spacesTimes+=4;
- kriloTimes = (width - spacesTimes)/4;
- for (int c3 = 1; c3 <= number-2; c3++)
- {
- string spaces = new string(' ', spacesTimes);
- string kriloRight = string.Join("", Enumerable.Repeat("\\*", kriloTimes));
- string kriloLeft = string.Join("", Enumerable.Repeat("*/", kriloTimes));
- string total = kriloLeft + spaces + kriloRight;
- kriloTimes--;
- spacesTimes += 4;
- Console.WriteLine(total);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement