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

 

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

Find the sum of the sequence whose terms are fractions made of consecutive numbers. For example if there is 1 term, the sum is 1/2 if there is 2 terms (1/2 + 2/3), the sum is 1.1666666666665 if there are 3 terms (1/2 + 2/3 + 3/4), the sum is 1.9166666666666665


sumFracs(1) → 0.5
sumFracs(2) → 1.1666666666666665
sumFracs(3) → 1.9166666666666665

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

public double sumFracs(int num) { }

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

Copyright Nick Parlante 2017 - privacy