Second Largest Even in java
For this challenge, you will be given an array and you are asked to find the second largest even number and print it to the stdout.
Input Format -
you will be taking a number as an input from stdin which tells about the length of the array. On another line, array elements should be there with single space between them.
Output Format -
print the second largest even number to the stdout.
Sample Test Case:
Sample Input:-6
78 92 44 63 71 97
Sample Output -
78
Input Format -
you will be taking a number as an input from stdin which tells about the length of the array. On another line, array elements should be there with single space between them.
Output Format -
print the second largest even number to the stdout.
Sample Test Case:
Sample Input:-6
78 92 44 63 71 97
Sample Output -
78
Comments
Post a Comment