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

 

sumRange


sumRange -- You are given the low and high numbers in a range (inclusive), and must calculate the sum of all integers in that range.


sumRange(1, 10) → 55
sumRange(2, 5) → 14
sumRange(-1, 1) → 0

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

public int sumRange(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: 20

Copyright Nick Parlante 2017 - privacy