Computer Science, asked by ProEvolution, 10 months ago

Write a program that prints the largest even number in the given list of integers.If there is no even number in the list, print 'No even element'

Answers

Answered by 07Amit
1

1. Take in the number of elements to be in the list from the user.

2. Take in the elements from the user using a for loop and append to a list.

3. Using a for loop, get the elements one by one from the list and check if it odd or even and append them to different lists.

4. Sort both the lists individually and get the length of each list.

5. Print the last elements of the sorted lists.

6. Exit.

Similar questions