I see. What does f1() do, and why on earth do you name it f1 when you can use a more descriptive name?Quote:
i was told by my supervisor that i was meant to write f1 as a function of i when it was in the loop!
Printable View
I see. What does f1() do, and why on earth do you name it f1 when you can use a more descriptive name?Quote:
i was told by my supervisor that i was meant to write f1 as a function of i when it was in the loop!
ok, ill change it! it is a function that is defined outside of int main. it has to compute values of a function at each iteration step in a loop statement. hence it is dependent on i! i have defined it at the top outside main, and then put the formula at the bottom after my return(0) }. the problem is that im not sure how to make it use the formula for each iteration step, also i have arrays in there, so it complicates it even further and puts it outside of my knowledge!