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

 

siochi@cnu.edu > addTo
prev  |  next  |  chance

addTo() -- given an int and an int array, return the int array whose elements are the sum of the int and that element.


addTo(1, [1, 2, 3]) → [2, 3, 4]
addTo(1, [-1, -2, -3]) → [0, -1, -2]
addTo(2, [0, 0, 0, 0]) → [2, 2, 2, 2]

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

public int[] addTo(int n, int[] nums) { }

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

Copyright Nick Parlante 2017 - privacy