So, i have been teasing the idea of starting a project of some kind but didn't know where to start. but i finally got it and i would like some others to help me.
i need a program to write in C++(of course)that you have made yourself or that you could make in an entry-level work enviorment.i want to see how far away i am until i can consider getting a programing job.
so tell me if you got any ideas...thanks
PS--if you have made the suggested program before please say if i can contact you on this site for some guidence.thanks
Write a program to calculate the (approximate) integral of a function for a given range. The function and range should be provided at run time.
The program should at least support the following tokens for the function: floating point number, +, -, *, /, ^, (, ), and x.
so am i embedding the function in source code and have you enter values or are you wanting the enter the equation into the program with the values already in the equation?
alright, lets see(hopefully i get this right this time)--
x0 and x1 is our beginning and end--- intervals of 1/20
then 1/20 goes into the f(x) the user provides == i[]
i[](1/20-0)+i[](2/20-1/20)...and so on == result
Yes, it looks like you've got it. Use smaller intervals, though, or let the user specify it. Even .00001 can run reasonably fast.
In any case, you won't have to deal with any of this math stuff until after you figure out how to parse and evaluate the expression the user provides.
Oh, and as a bonus, plot the function on something.
can anyone explain strtok()-- i get that it searchs for the tokens and removes them from the string and displays everything else. what else can you do with it?