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

 

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

Write a method that adds 'amount' to each element of array 'nums'. Note that you do not know how long array 'nums' will be. It could even be an empty array! Look at the test data for examples.


todays_2021_10_28_APSL_inc([15, 20, 40, 4, 46, 436, 75, 325, 342, 78, 65, 129, 42397, 359, 4290], -200) → [-185, -180, -160, -196, -154, 236, -125, 125, 142, -122, -135, -71, 42197, 159, 4090]
todays_2021_10_28_APSL_inc([5, 6, 12, 200, 4], 10) → [15, 16, 22, 210, 14]
todays_2021_10_28_APSL_inc([], 5) → []

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

public int[] todays_2021_10_28_APSL_inc(int[] nums, int amount) { }

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

Copyright Nick Parlante 2017 - privacy