Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- Console.WriteLine("Insert 10 numbers");
- Console.WriteLine("=====================");
- string x = Console.ReadLine();
- string[] split = x.Split(new char[] { ' ' });
- if (split.Length < 9)
- {
- Console.WriteLine("Please insert 10 numbers");
- Console.WriteLine("=====================");
- x = Console.ReadLine();
- split = x.Split(new char[] { ' ' });
- }
- Console.WriteLine("Second highest number: ");
- Console.WriteLine("=====================");
- Array.Sort(split);
- Console.WriteLine(split[split.Length - 1]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement