# Minimal and maximal value of a function

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

Not open for further replies.
1. ### StormcasteRNew Member

Joined:
Dec 20, 2008
Messages:
4
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);
{"ft_lang_label":"__label__en","ft_lang_prob":0.86376095,"math_prob":0.93702185,"size":865,"snap":"2020-34-2020-40","text_gpt3_token_len":218,"char_repetition_ratio":0.10569106,"word_repetition_ratio":0.012658228,"special_character_ratio":0.26936415,"punctuation_ratio":0.115,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9711284,"pos_list":[0,1,2],"im_url_duplicate_count":[null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-26T18:09:45Z\",\"WARC-Record-ID\":\"<urn:uuid:0bd6c427-c1da-4661-8826-67d3084a4ceb>\",\"Content-Length\":\"41616\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:55b8112b-09fc-41fc-b4d0-692a47fa2da5>\",\"WARC-Concurrent-To\":\"<urn:uuid:1805941c-ccdb-4b68-aabc-e271a506dba7>\",\"WARC-IP-Address\":\"173.230.137.46\",\"WARC-Target-URI\":\"https://www.go4expert.com/forums/minimal-maximal-value-function-t15556/\",\"WARC-Payload-Digest\":\"sha1:MBO6ODVOXGYJG6P4A2MANISCDDD3UQVL\",\"WARC-Block-Digest\":\"sha1:F7TXAMTU5L7WJLM3WMXWCBQAY62DG6NM\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600400244353.70_warc_CC-MAIN-20200926165308-20200926195308-00398.warc.gz\"}"}