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
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
Math,
5 months ago
Hindi,
5 months ago
English,
5 months ago
Science,
11 months ago
CBSE BOARD X,
11 months ago
India Languages,
1 year ago