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

 

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

Write a method that returns the sum of all the numbers in array 'nums' that are greater than 'min'. Look at the test data for examples.


jan30_2020_APP1SLHL_sumIfGreater([5, 7, 10, 14], 20) → 0
jan30_2020_APP1SLHL_sumIfGreater([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], 1) → 209
jan30_2020_APP1SLHL_sumIfGreater([1, 2, 3, 4, 5, 6, 7, 8, 8, 10, 11, 12, 13, 14, 15], 12) → 42

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

public int jan30_2020_APP1SLHL_sumIfGreater(int[] nums, int min) { }

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

Copyright Nick Parlante 2017 - privacy