using System;
public class Program
{
public static void Main()
//Console.WriteLine("Hello World");
int [] a = {4, 5, 6, 7, 8};
int max_1 = int.MinValue, max_2 = int.MinValue;
if(a.Length < 2)
Console.WriteLine("Array length is smaller than 2");
else
for(int i = 0; i < a.Length; i++){
if(a[i] > max_2){
max_2 = a[i];
if(max_2 > max_1){
int temp = max_2;
max_2 = max_1;
max_1 = temp;
}
Console.WriteLine("2nd maximum number is {0}", max_2);