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()); char inputLetter = .... int letter = Convert.ToInt32(Console.ReadLine()); 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 == 3) { 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
Interlocked Class (atomic operations)
Ok
Fórum ➡ Finding STRONG tags that contain UL tags, using Regex class♦
borrar_xml_tags_vacios
My name
Fórum SO ➡ Merging 2 lists by Name and adding their Values, using LINQ ♦
Sample Code
Find Highest,Lowest and average using two dimensional arrays
Math 10.93 added fracOp
Second minor int