1. How to write a C++ program that determine the average velocity of a moving object, whose position in time is represented by user specified quadratic or cubic curve? [The program should first ask the user whether the velocity to be determined is from a quadratic or cubic curve, and then the program must specifically cater for the request]
2. How to write a C++ program, which gets from user a quadratic equation within an integral and approximates its integration value based on the trapezoidal method?
Thanks!
How to write C++ program ???
Get the input eqn as a string specifying only the coefficient of powers(eg,if eqn is x(t) = 3t^3+2t+1 user should enter 3 0 2 1.This is only for reduction in input parameter parsing logic and stuff).Then get the differential of the eqn w.r.t t by using the formula of diff for polynomials and substitute the values.You get the velocity.
As for the trapezoidla method,try an iterative approach interpolating the curve at regular intervals.Must be quite easy to implement on a computer in C++.
Reply:if you know the basic of c++ ,use flowchart first then convert into c++ code... thats all
Reply:I do not think anyone will do your homework for free. May be you can contact a C++ expert. Check websites like http://askexpert.info/
Reply:write flowchart, convert to c++ code.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment