Minimal and maximal value of a function

Discussion in 'C' started by StormcasteR, Dec 20, 2008.

Thread Status:
Not open for further replies.
  1. StormcasteR

    StormcasteR New Member

    Joined:
    Dec 20, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Student
    Hi guys, I'm a beginner in C++ and i managed to do my exams and homeworks pretty good so far but now I'm in a big-time trouble with this project.Please check this out and help me understand what to do to create this task :(

    You have to 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.
    Please, send the source code of your program together with 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=7, b=10, c=-5, d=10, f(x)=(1+x)*(1-x);
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice