Problem Description
Write a program to find the biggest even number from the given input
Input:Positive numbers
Output:Display the largest even number.
Refer sample input and output for formatting specification.CODING ARENA
arr=[]
a=int(input())
b=(input().split())
for i in range(a):
if(int(b[i])%2==0):
arr.append(b[i])
print("Largest even number:",arr[-1])
Test Case 1
Input (stdin)5
199 191 991 2 551Expected OutputLargest even number: 2
Test Case 2
Input (stdin)7
199 191 991 2 551 226 554Expected OutputLargest even number: 554
✖
Share this Posts
Subscribe Our Newsletter
0 Comment
Post a Comment