Displaying function in C++. Help Needed!

Build the algorithm which calculates and prints the values of the function y = x*x *sin(x) for x belonging to <x1, x2> with step dx starting from x1. For each x calculate maximum value and minimum value of y for <x1, x> and the difference between maximum and minimum values.

Hi, can someone please write this code for me?

Thank You.

> Hi, can someone please write this code for me?
No, we're here to help and educate.
Not be your free code-monkey writing service.

> for x belonging to <x1, x2> with step dx starting from x1
Otherwise known as
1
2
3
for ( x = x1 ; x <= x2 ; x += dx ) {
  // evaluate your y expression.
}


Over to you.
You're right, sorry and thank you! :)
Topic archived. No new replies allowed.