WAP to input any 20 numbers and count and display how many are even and odd
Answers
Answered by
1
Answer:
If you are using python then:
l = []
for i in range(20):
inp = int(input("Enter num"))
l.append(inp)
even = [l.remove(i) or i for i in l if i%2==0]
print(f"Even Numbers: {even} Odd Numbers: {l}")
Similar questions
Math,
15 days ago
Environmental Sciences,
15 days ago
Math,
15 days ago
Chemistry,
1 month ago
History,
1 month ago
Social Sciences,
9 months ago
English,
9 months ago