I'm working on a program That sounds like a Calculator You give him a function and he will graph,it but there was a problem that if the user chose for example "x + sin(x)" this equation must be in a for Loop as it is to be evaluated So I'm am asking him to type his equation "as I said before like the Calculator Input" and put it in a Variable "F" and then the for loop but the problem is that x must be initialized! Which mean that the equation have a Value before it enters the loop,,Any one have any IDEA how to fix it...?
Think about what you are doing when you chart something like "x + sin(x)" on a piece of graph paper. You're creating a line that represents all of the possible points that function could create, the actual input into the function isn't used in the calculation it's just a placeholder.
Yes .. that is right but the problem is that it is not written x + sinx like that .. I mean the user might use any function it is bottoms and he chose any thing ,, so there is ifs in a loop then the function when here press graph .. look I have made a program like that but only he can chose one function .. I will try to upload it for you to get the picture ,,,
Why upload anything? If you link to a binary I guarantee less than 1 in 10 of us will even download it much less try to execute it. Just copy paste the code inside the formatting blocks.
If you're not in a place where you can modify the code then there is little to nothing we can do to help you anyway. No worries though this site seems to always has someone willing to help at all hours of the day. Just get back to us when you get back to your work\battlestation.