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

 

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

Write a method that returns an array of 10 integers where each array element represents a digit in the input parameter 'num'. The input parameter will be a non-negative integer. This could be done recursively, but recursion is NOT required! Note that the digits will be right-justified in the array, so that array element 9 is the one's place, array element 8 is the ten's place, and so on.


radSplit(123987001) → [0, 1, 2, 3, 9, 8, 7, 0, 0, 1]
radSplit(1234567) → [0, 0, 0, 1, 2, 3, 4, 5, 6, 7]
radSplit(400201) → [0, 0, 0, 0, 4, 0, 0, 2, 0, 1]

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

public int[] radSplit(int num) { }

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

Copyright Nick Parlante 2017 - privacy