Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Programmer DNA
//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()); lines = 10; //char inputLetter = Convert.ToChar(Console.ReadLine()); //int letter = Convert.ToInt32(inputLetter); int letter = F; 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 < 3) { 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
Messages
Min max elements swap of the array
c# abstract
Tarkov Time
parsowanie daty
123.0
axasd
sdfgjikjuyhtgrfed
Validation along token stack feature
C# Basic learning