Pass by Array               Create a JAVA program that will ask the user to enter ten numbers and get the sum of all odd numbers. The numbers will be stored in array The array value will be pass as argument to the function

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 3.5CP
icon
Related questions
Question

Pass by Array

 

            Create a JAVA program that will ask the user to enter ten numbers and get the sum of all odd numbers.

  • The numbers will be stored in array
  • The array value will be pass as argument to the function

 

Enter 10 numbers: 1 2 3 4 5 6 7 8 9 1 Enter 10 numbers: 3 2 6 8 3 9 70 1 5
The sum of all odd numbers is 25
The sum of all odd numbers is 28
Transcribed Image Text:Enter 10 numbers: 1 2 3 4 5 6 7 8 9 1 Enter 10 numbers: 3 2 6 8 3 9 70 1 5 The sum of all odd numbers is 25 The sum of all odd numbers is 28
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Program on Numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning