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

 

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

Write a method that returns the "Ebbert" of a positive integer. The "Ebbert" of a positive integer is found by treating the ones place as a base, and each successively higher place value (10's place, 100's place, etc.) as a power. For example, the "Ebbert" of 432 would be found by (2^3)^4 which equals 4096. Since these numbers can get very big very fast, return your answer as a double. You may use Math.pow to help you if you want to, but it is not required. You may use recursion, but it is not required. As a precondition you may assume that the test data will not be so large that it causes round off error in the result.


quiz2020_12_02_SLHL_digitPow(104) → 1.0
quiz2020_12_02_SLHL_digitPow(2225) → 390625.0
quiz2020_12_02_SLHL_digitPow(218) → 64.0

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

public double quiz2020_12_02_SLHL_digitPow(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: 250

Copyright Nick Parlante 2017 - privacy