Computer Science, asked by snigdhasen723, 1 month ago

wap to input 8 numbers in an array and show all the numbers , at end also display the sum of odd and even numbers saperately​

Answers

Answered by Ancrbot
1

Answer:

This is written in python. Feel free to take the idea and translate it to your needs

Explanation:

while int i < 8:

global array

array = []

usr_input = int(input()) #Converts users input to integers

array.append(usr_input)#Puts the inputed number in the array

i++

print(array)

print(array[0] + array[1] + array[2] + array[3] + array[4].....)

#Do so on till array [7] since computers count from 0

Similar questions