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_productBetween
prev  |  next  |  chance

Write a method that returns the product of all the integers from 'low' to 'high' inclusive. For example if 'low' is 3 and 'high' is 5, the product of all the integers from 3 to 5 is 3*4*5=60. You may assume that 'high' is greater than 'low' and that the result will be less than the maximum possible Java integer. You may also assume that 'low' is at least 1.


quiz2020_12_15_APP1SLHL_productBetween(12, 14) → 2184
quiz2020_12_15_APP1SLHL_productBetween(18, 22) → 3160080
quiz2020_12_15_APP1SLHL_productBetween(5, 7) → 210

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

public int quiz2020_12_15_APP1SLHL_productBetween(int low, int high) { }

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