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.
f(x,y)=2-x+7*x*x-x*x*x;
You aren't storing the minimum or maximum value. Looks to me like you're just outputting the value of f every time you calculate it. Also, what do you think your second for loop is doing? It does not have any statements following it in braces (i.e. no {...} after your second for statement). This means that only the first statement following it gets executed within the loop; is that what you meant to do?
The problem isn't really your code; the problem is that you haven't thought enough about what you want to do with the numbers.