about | help | code help+videos | done | prefs |
Write a method that has parameters 'num' and 'zeros'. Return an integer value that has 'zeros' number of zeros at the end of 'num'. For example, if 'num' is 312 and 'zeros' is 2 you would return 31200. Look at the test data for further examples. As preconditions you may assume that 'num' is positive, 'zeros' is non-negative, and that the result will still be small enough to return as an integer without overflow or wrap-around. You may NOT use any strings or arrays in solving this problem! quiz2020_12_02_APP1SLHL_addZeros(45, 3) → 45000 quiz2020_12_02_APP1SLHL_addZeros(7801, 2) → 780100 quiz2020_12_02_APP1SLHL_addZeros(4892, 0) → 4892 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy