Write a void method named percentEven that accepts an array of integers as a parameter and prints the percentage of even numbers in the array as a real number and the positions that hold the even numbers. For example, if a variable named nums refers to an array of the elements (26, 52, 39, 71, 73}, the call of percentEven (nums) should print : Position [0] has an even number Position [1) has an even number The percent of even numbers is 40.04 If the array contains no even elements or no elements at all, print The percent of even numbers is 0.04.
Write a void method named percentEven that accepts an array of integers as a parameter and prints the percentage of even numbers in the array as a real number and the positions that hold the even numbers. For example, if a variable named nums refers to an array of the elements (26, 52, 39, 71, 73}, the call of percentEven (nums) should print : Position [0] has an even number Position [1) has an even number The percent of even numbers is 40.04 If the array contains no even elements or no elements at all, print The percent of even numbers is 0.04.
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 13RQ
Related questions
Question
can you plz write it in java.util.scanner form
and can you plz make it so i can copy and past it.
![Write a void method named percentEven that accepts an array of integers as a parameter and prints the percentage of even numbers in the array as a real number and the positions that hold the
even numbers.
For example, if a variable named nums refers to an array of the elements {26, 52, 39, 71, 73},
the call of percentEven (nums) should print :
Position [0] has an even number
Position [1] has an even number
The percent of even numbers is 40.0g
If the array contains no even elements or no elements at all, print The percent of even numbers is 0.08.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5009a5f7-cb0c-44c8-a915-95d249ae3d2b%2F35bcb37a-4f0a-4c44-b348-3213694fb05f%2F3hzm57w_processed.png&w=3840&q=75)
Transcribed Image Text:Write a void method named percentEven that accepts an array of integers as a parameter and prints the percentage of even numbers in the array as a real number and the positions that hold the
even numbers.
For example, if a variable named nums refers to an array of the elements {26, 52, 39, 71, 73},
the call of percentEven (nums) should print :
Position [0] has an even number
Position [1] has an even number
The percent of even numbers is 40.0g
If the array contains no even elements or no elements at all, print The percent of even numbers is 0.08.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage