CodeSolved

Solved Programming Questions & Exercises

Calculate the sum of the odd numbers in the list

Practice Easy 2597/ Download 38 Views New

Write a program that receives a list of integers and calculates and displays the sum of all the odd numbers in it.
For example, if the input is:

numbers = [3, 8, 5, 12, 7, 10]

The output of the program should be the number 15, because the odd numbers 3, 5 and 7 are added.

0 Answers

Submit answer

Submitting answers is currently unavailable.

×
×
Close