Some type of function Error

Hi,
I wrote a function to find the sum of an equation, but the output I keep getting is 0, when it should be 784 when x = 7. Can anyone tell me what is wrong?

 
Last edited on
Line 19 needs to be double i = 0;
ok that worked thanks! can u explain why?
1
2
3
double i;

while(i < someNum)


You need to initialize your loop control variable.
Topic archived. No new replies allowed.