id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us arrays > productEvenOdd
prev  |  next  |  chance

Write a method that accepts an array of non-negative integers, then finds the average of all the even integers, and the average of all the odd integers. Return the product of these two averages rounded to the nearest integer. The array will contain at least one number.


productEvenOdd([1, 3, 6, 5, 4]) → 15
productEvenOdd([18]) → 0
productEvenOdd([3]) → 0

...Save, Compile, Run (ctrl-enter)

public int productEvenOdd(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 420

Copyright Nick Parlante 2017 - privacy