Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
s 3
//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) { int number, i, k, count = 1; Console.Write("Enter number of rows\n"); number = int.Parse(Console.ReadLine()); count = number - 1; for (k = 1; k <= number; k++) { for (i = 1; i <= count; i++) Console.Write(" "); count--; for (i = 1; i <= 2 * k - 1; i++) Console.Write("*"); Console.WriteLine(); } count = 1; for (k = 1; k <= number - 1; k++) { for (i = 1; i <= count; i++) Console.Write(" "); count++; for (i = 1; i <= 2 * (number - k) - 1; i++) Console.Write("*"); Console.WriteLine(); } Console.ReadLine(); } } }
run
|
edit
|
history
|
help
0
Decimal Test2
Hello
Switch on String
asxasxd
factorial ncr
Unity Character Controller Version 1
Simple Parallel.For example
deqnq the random sentence generator
gh
random number generator