Computer Science, asked by shabdsharma23, 5 months ago

Write a program to input a single dimension array of 10 integers. Print the

elements of array which are even ​

Answers

Answered by vidhap00
0

Answer:

n = input().split()

list = n

for i in range(len(n)):

list[i] = int(n[i])

for x in list:

print(x if x%2==0 else "" , end=" ")

Explanation:

simple.

take input of string.

split each element and store in n.

convert the single string elements to integer and store in list.

print even by checking if it is or not.

Similar questions