C# Number Pattern (28) |
/* C# program to print the following pattern 0 909 89098 7890987 678909876 56789098765 4567890987654 345678909876543 23456789098765432 1234567890987654321 */ namespace Patterns { class Program { static void Main(string[] args) { int i, j; Console.WriteLine("0"); for (i = 9; i >= 1; i--) { for (j = i; j <= 9; j++) Console.Write( j); Console.Write("0"); for (j = 9; j >= i; j--) Console.Write(j); Console.WriteLine(); } } } }