Jump to content
xisto Community

tigershubham

Members
  • Content Count

    1
  • Joined

  • Last visited

Everything posted by tigershubham

  1. 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()); } } }}
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.