C Sharp Program to find maximum number in array
using System; namespace FindMax { class Program { static void Main(string[] args) { int[] a = new int[10]; // Array named 'a' to store numbers Console.WriteLine("Enter 10 numbers:"); for (int i = 0; i < 10; i++) { Console.Write("Enter a Number : "); a[i] = int.Parse(Console.ReadLine()); } int max = a[0]; // Assume the first number is the maximum for (int i = 1; i < a.Length; i++) { if (a[i] > max) { max = a[i]; } } Console.WriteLine("The maximum number is: "+max); Console.ReadKey(); } } } Output: