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

 

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

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


quiz2020_12_15_APP1SLHL_offsetArray([], 7) → []
quiz2020_12_15_APP1SLHL_offsetArray([17, 33, 50], -1) → [16, 32, 49]
quiz2020_12_15_APP1SLHL_offsetArray([5, 6, 2, 5, 15, 2, 7], 3) → [8, 9, 5, 8, 18, 5, 10]

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

public int[] quiz2020_12_15_APP1SLHL_offsetArray(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: 220

Copyright Nick Parlante 2017 - privacy