Mode Gelap

Recent in Fashion

Best Seller Books

Bigger Even

  • 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 551

    Expected Output
    Largest even number: 2
  • Test Case 2

    Input (stdin)
    7

    199 191 991 2 551 226 554

    Expected Output
    Largest even number: 554

Subscribe Our Newsletter

avatar
"By speaking behind my back, it means that you respect my existence enough not to act in front of my face."

Related Posts

0 Comment

Post a Comment

Article Top Ads

Parallax Ads

Article Center Ads

Article Bottom Ads