So what this problem in the book is asking me to do is to write a method with a parameter N and what it should print is
1 when I call printFractionSum(1)
and when I call printFractionSum(5) it does
1+(1/2)+(1/3)+(1/4)+(1/5)
public static void main(String[] args) {
printfractionSums(5);
}
public static void printfractionSums(int n) {
for (int i = 1; i <= n-1; i++) {
System.out.print(1 "+" 1/n-i);
}
}
That is what I have so far and I don't know how to go any further. Am I doing it right? Am I doing it wrong? I would really like to know how to do this so please tell me if you want me to reword the question.