Programming Basics
Може ли някой да помогне ?
Условие:https://judge.softuni.bg/Contests/968/Programming-Basics-Online-Exam-10-and-11-March-2018
05. Arrow
Това ми е пешението:
using System;
namespace Arrow
{
class Arrow
{
static void Main()
{
int n = int.Parse(Console.ReadLine());
int width = n + 5;
Console.WriteLine("{0}^{0}", new string('_', n / 2 + 2));
Console.WriteLine("{0}/|\\{0}", new string('_', n / 2 + 1));
Console.WriteLine("{0}/|||\\{0}", new string('_', n / 2));
for (int i = 0; i < (n + 2) / 3; i++)
{
Console.WriteLine("{0}/{1}|||{1}\\{0}", new string('_', n / 2 - i - 1),
new string('.', i + 1));
}
for (int i = 0; i < n / 3; i++)
{
if (n <= 8)
{
Console.WriteLine("{0}/{1}|||{1}\\{0}", new string('_', (n + 5 - 9) / 2 + i), new string('.', n / 3 - i));
}
else
{
Console.WriteLine("{0}/{1}|||{1}\\{0}", new string('_', (n + 5 - 9) / 2 + i), new string('.', n / 3 - i - 1));
}
}
for (int i = 0; i < n; i++)
{
Console.WriteLine("{0}|||{0}", new string('_', n / 2 + 1));
}
Console.WriteLine("{0}~~~~{0}", new string(' ', n / 2 + 1));
Console.WriteLine("{0} {0}", new string('_', n / 2 + 1));
for (int i = 0; i < n / 2; i++)
{
Console.WriteLine("{0}/{1}!{1}\\{0}", new string('_', n / 2 + 1 - i), new string('.', i));
}
}
}
}
Много благодаря! Помогнахте ми много.