Friday, July 31, 2009

C programming... Please help....Thanks?

Develop a C-code that calculates the following summation:





sum =0.5f0 + 0.5fN + Sigma(summation) from n=1 to N-1 of fi





Note : 0, N and i are subscripts.





where fi = f(xi) is a function. Choose ONE of the following functions:





f(x) = xe^x and epsilon ranges from 0 to 10.





and carry out the above summation using N = 21 and N = 41, to. Print out all and the results of summation using the above formula.





Your C-code must contain the following features: (1) use of arrays, (2) use of pointers, (3) use of structure, (4) use of union, (5) use of functions and function calls, (6) formatted output on screen and (7) saving of the same output on a file.

C programming... Please help....Thanks?
You just need to use a for loop, not that difficult.


No comments:

Post a Comment