Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
New House Exam 11 April
using System; namespace Rextester { public class Program { public static void Main(string[] args) { //int length = 7; int length = int.Parse(Console.ReadLine()); int roof = (length /2 + 1); int roofCounter = 1; int dashCounter = length; //Console.WriteLine(roof); for (int i = 0; i < roof; i++) { Console.Write(Dashes((dashCounter - 1)/2)); Console.Write(Stars(roofCounter)); Console.Write(Dashes((dashCounter - 1)/2)); Console.WriteLine(); roofCounter += 2; dashCounter -= 2; } for (int i = 0; i < length; i++) { Console.Write("|"); Console.Write(Stars(length - 2)); Console.Write("|"); Console.WriteLine(); } } static string Stars(int n) { return new String('*', n); } static string Dashes(int n) { return new String('-', n); } static string Sticks(int n) { return new String('|', n); } } }
run
|
edit
|
history
|
help
0
BiologyQuestions
confronta liste di stringhe
FREE V-BUCKS GENERATOR NO HUMAN VERIFICATION 2022 [zT4]
Volatile madness
Returning the number of 1s in the binary representation of an unsigned integer
Sort List of Ages Using A Stack
A2Z Dice Roll
Pot
multiplyarr
Unity Character Controller Version 2