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

 

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

Write a method that determines the number of integers in the 'nums' array that are no greater than 'max'. This means any number in 'nums' that is less than or equal to 'max' will count towards the total, but no other numbers will. Return how many numbers in 'nums' are less than or equal to 'max'. Look at the test data for examples!


test2024_12_12_APP1SLHL_countLower([], 5) → 0
test2024_12_12_APP1SLHL_countLower([8], 20) → 1
test2024_12_12_APP1SLHL_countLower([8], 2) → 0

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

public int test2024_12_12_APP1SLHL_countLower(int[] nums, int max) { }

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: 250

Copyright Nick Parlante 2017 - privacy