Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
DNA Programmer
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Letter converter //Trqbwa da napravq da se vyvejda char, koito da se prevryshta v int int lines = Convert.ToInt32(Console.ReadLine()); char inputLetter = Convert.ToChar(Console.ReadLine()); int letter = Convert.ToInt32(inputLetter); lines = lines - 3; int dots = 3; int numberLetters = 1; for (int i = 0; i < lines; i++) { int counter = numberLetters; if (letter > 71) { letter = 65; } //backwards if (numberLetters > 7) { if (letter > 71) { letter = 65; } dots = 0; numberLetters = 5; while (dots < 4) { counter = numberLetters; numberLetters = numberLetters - 2; dots++; if (dots == 4) { dots = 3; numberLetters = 1; break; } Console.Write(Spaces(dots)); while (counter > 1) { if (letter > 71) { letter = 65; } Console.Write((char) letter); letter++; counter--; } if (letter > 71) { letter = 65; } Console.Write((char) letter); Console.Write(Spaces(dots)); Console.WriteLine(); letter++; } } //increases letter Console.Write(Spaces(dots)); while (counter > 1) { if (letter > 71) { letter = 65; } Console.Write((char) letter); letter++; counter--; } Console.Write((char) letter); Console.Write(Spaces(dots)); Console.WriteLine(); dots--; numberLetters = numberLetters + 2; if (dots < 0) { dots = 3; } letter++; } } static string Spaces(int n) { return new String('.', n); } } }
run
|
edit
|
history
|
help
0
adxasxsd
squaredigits
System Convert
removeDuplicate C#
Xml in C#
Get direct link from onedrive.com
cte-like constructs in C#
Some Fibonacci
sroitureoit
How do I calculate someone's age in C#?