Hello,
I am horrible at math and am trying to figure out how to make a program in which you would calculate, and display the answer for the following:
1/1+1/2+1/3+1/4+1/5............1/999999+1/1000000
we are suppose to use both floating point and double variables. The problem is i cant logically think of a way to make the denominators change, while doing the addition opperation. Please keep in mind this is a beginer class and we really havnt gone over much besides input, output, if statements, while, do-while and for loops. By the way we are supposed to use while, do-while or for's to do this. I am sorry if this seems like i'm wanting you to do my homework for me, but its kind of hard whne there are no tutor or anything to talk me through this (professor office hours are all durring either work or my other class times)
thank you all for your time.
I am horrible at math and am trying to figure out how to make a program in which you would calculate, and display the answer for the following:
1/1+1/2+1/3+1/4+1/5............1/999999+1/1000000
we are suppose to use both floating point and double variables. The problem is i cant logically think of a way to make the denominators change, while doing the addition opperation. Please keep in mind this is a beginer class and we really havnt gone over much besides input, output, if statements, while, do-while and for loops. By the way we are supposed to use while, do-while or for's to do this. I am sorry if this seems like i'm wanting you to do my homework for me, but its kind of hard whne there are no tutor or anything to talk me through this (professor office hours are all durring either work or my other class times)
thank you all for your time.
Comment