Simple Plotting of a function is to display its values within an interval [a, b] using simple symbols. For example, plotting
f(x) =ax3+bx2+cx + d
in the interval [x1, x2] is to display the points:
(x1, f(x1)), (x1+dx, f(x1+dx)), …, (x2, f(x2))
on the screen. dx is an increment used to have enough values between x1 and x2.
The menu consists of the following options:

  1. Read a third-degree function.
  2. Plot the function in [x1,x2].
  3. Plot the derivative of the function in [x1,x2].
  4. Plot the function and its derivative in [x1,x2].
  5. Find the maximum of the function in [x1,x2]
  6. Find the minimum of the function in [x1,x2]
  7. Quit.

You should apply modular programming, with a separate function for each major task in your program.

Post the code if you have any problems with it , the whole point of the assignment is to think and learn , not to copy . This is a fairly easy task since you already have the information that the function is going to be a third degree .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.