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

 

sspiege3@schools.nyc.gov arrayssumcount > numOdd
prev  |  next  |  chance

Write a method to determine how many odd integers occur in an array (int [] nums ). You will need to loop through all of the elements of the array.


numOdd([2, 3, 4, 4, 5]) → 2
numOdd([1, 2]) → 1
numOdd([3, 3, 4, 3, 3, 3]) → 5

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

public int numOdd( 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: 201 Post-solution available

Copyright Nick Parlante 2017 - privacy