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

 

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

Write a method that returns a new array based on 'nums' but with each element increased by 'add'. Look at the test data for examples.


practice2023_10_20_increaseAll([6, 8, 10, 12], -6) → [0, 2, 4, 6]
practice2023_10_20_increaseAll([10, 100, 1000], -5) → [5, 95, 995]
practice2023_10_20_increaseAll([7], 1) → [8]

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

public int[] practice2023_10_20_increaseAll(int[] nums, int add) { }

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

Copyright Nick Parlante 2017 - privacy