Write a program to take input 5 integers from user and in output print the sum of only odd numbers in output. Example: For input 12,3,7,19,6 the output should be 3 + 7 + 19 = 29. Note- Do it using array by storing the numbers in array first. C++

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 7PP: (Numerical) Using the srand() and rand() C++ library functions, fill an array of 1000 floating-point...
icon
Related questions
Question
100%

Write a program to take input 5 integers from user and in output print the sum of only odd numbers in output. Example: For input 12,3,7,19,6 the output should be 3 + 7 + 19 = 29.
Note- Do it using array by storing the numbers in array first.

C++

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr