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

 

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

Write a method that returns the sum of all the integers between 'low' and 'high' inclusive. As a precondition you may assume that 'high' is greater than or equal to 'low' and that both are positive.


test2020_10_01_APP1SLHL_sumBetween(4, 4) → 4
test2020_10_01_APP1SLHL_sumBetween(1, 2) → 3
test2020_10_01_APP1SLHL_sumBetween(2, 3) → 5

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

public int test2020_10_01_APP1SLHL_sumBetween(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: 240

Copyright Nick Parlante 2017 - privacy