I'm guessing he/she wants a method that looks like
public double theSum(int n) {
...
}
where n
is the number of terms (so that the last term is n/(n+1)
). Then the main
method will call theSum(??)
with some value as the parameter that will be used for n
. Of course that will mean you're doing extra computation to print the table, but don't worry about that. (Maybe you should call it m
instead of theSum
since that what they called the function. I just don't like one-letter function names.)