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

 

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

Write a method that finds the sum of all the intergers from 'first' to 'last'. For example: loopyLoop5(1, 3) returns a 6 because 1+2+3=6


loopyLoop5(1, 3) → 6
loopyLoop5(5, 10) → 45
loopyLoop5(100, 101) → 201

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

public int loopyLoop5(int first, int last) { }

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: 290

Copyright Nick Parlante 2017 - privacy