How to check Palindrome word using C#

Palindrome word can be read in both direction. Suppose “level” can be read in both direction, so it is palindrome word. To check palindrome word you can try like following code using C#. class Program { public static bool IsPalindrome(string word) { int minLength = 0; int maxLength = word.Length – 1; while (true) {

Read More

Draw star pyramid using C#

Sample input: 5 Sample output: Code: /*Author: Md. Mahedee Hasan*/ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace StarPyramid { class Program { static void Main(string[] args) { Console.WriteLine(“Enter a number to draw pyramid: “); int nRow = 0; nRow = Convert.ToInt32(Console.ReadLine()); for (int row = 1; row