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

 

sspiege3@schools.nyc.gov > sumOdds2
prev  |  next  |  chance

Complete the method sumOdds2 such that it calculates and return the SUM OF ODD numbers in between num1 and num2 inclusive. It is a given that num1 < num2


sumOdds2(3, 11) → 35
sumOdds2(100, 200) → 7500
sumOdds2(5, 10) → 21

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

public int sumOdds2(int num1, int num2){ }

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

Copyright Nick Parlante 2017 - privacy