0

write a program in C++ that computes the minimal and the maximal value of function f(x,y) obtained on an integer point in a given rectangle [a, b] x [c, d]. Your program should prompt the user to input numerical values of a, b, c and d, as floating point numbers, which are expected to be in a range from -100 thru 100. In case when minimal or maximal values do not exists, your program should output appropriate messages.

The calculated integer values of x and y for which f(x,y) reaches its minimum and maximum on [a, b] x [c, d].

a=1, b=10, c=1, d=-20, f(x,y)=2-x+7*x*x-x*x*x;

thnx in advance