tigershubham 0 Report post Posted November 16, 2011 using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace csharp{ class Program { static void Main(string[] args) { bool m = true; while (m == true) { Console.WriteLine("Enter the number"); int n = Convert.ToInt32(Console.ReadLine()); for (int i = 1; i <= n; i++) { int j; for (int s = 1; s <= i - 1; s++) { Console.Write(" "); } for (j = i; j <= n; j++) { Console.Write("" + j); } for (int k = j - 2; k >= i; k--) { Console.Write("" + k); } Console.WriteLine(""); } Console.ReadLine(); Console.WriteLine("Continue (True/False)"); m = Convert.ToBoolean(Console.ReadLine()); } } }} Share this post Link to post Share on other sites
yordan 10 Report post Posted November 20, 2011 Please do not forget the "code" tag when you post code examples. Share this post Link to post Share on other sites