answersLogoWhite

0


Best Answer

'*** PROGRAM: Compare 2 numbers using both min/max functions;

' then, output which number is max/and, which is min.

'*** declare variables...

min = 0

max = 0

number1 = 342

number2 = 256

'*** main program...

CLS '...(CL)ear the Output (S)creen

PRINT "Minimum = "; findMin(number1, number2)

PRINT "Maximum = "; findMax(number1, number2)

END '...END of program/halt program code execution

FUNCTION findMax (num1, num2)

answer = 0

IF num1 > num2 THEN answer = num1 ELSE answer = num2

findMax = answer

END FUNCTION

FUNCTION findMin (num1, num2)

answer = 0

IF num1 < num2 THEN answer = num1 ELSE answer = num2

findMin = answer

END FUNCTION

---program output...

Minimum: 256

Maximum: 342

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find the minimum and the maximum of a function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you find the minimum or maximum of a function?

By taking the derivative of the function. At the maximum or minimum of a function, the derivative is zero, or doesn't exist. And end-point of the domain where the function is defined may also be a maximum or minimum.


How do you determine the range of a function?

Find the maximum and minimum values that the function can take over all the values in the domain for the input. The range is the maximum minus the minimum.


What is maximum or minimum of function?

Addition is the maximum or minimum function in math.


How can you use the zeros of a function to find the maximum or minimum value of the function?

You cannot. The function f(x) = x2 + 1 has no real zeros. But it does have a minimum.


How do you find minimum and maximum value of calculus?

In Calculus, to find the maximum and minimum value, you first take the derivative of the function then find the zeroes or the roots of it. Once you have the roots, you can just simply plug in the x value to the original function where y is the maximum or minimum value. To know if its a maximum or minimum value, simply do your number line to check. the x and y are now your max/min points/ coordinates.


What is the maximum and minimum of quadratic function parent function?

The minimum is the vertex which in this case is 0,0 or the origin. There isn't a maximum.....


How do you find maximum or minimum of a function?

y=2x2-3x2-12x+5=0


How do you find the minimum and maximum points of a function?

Set the first derivative of the function equal to zero, and solve for the variable.


How do you get a maximum displacement?

To determine the maximum displacement, you need to calculate the peak value of the displacement function. This is done by finding the extreme values (maximum or minimum) of the function, typically by taking the derivative and setting it to zero to find critical points. Once you have these critical points, evaluate the function at those points to find the maximum displacement.


How can you find the extremums in a function?

The general procedure is to find the function's derivative, and then solve for (derivative of the function) = 0. Each of these solutions may be a local maximum or minimum - or none. Further analysis is required. A local maximum or minimum may also occur at points where the derivative is undefined, as well as at the function's endpoints (assuming it is only defined for a certain range, for example, from 0 to 10).


How do you find the range and domain of a graph function?

Assuming the standard x and y axes, the range is the maximum value of y minus minimum value of y; and the domain is the maximum value of x minus minimum value of x.


How do you determine wheather a quadratic function has a maximum or minimum and how do you find it?

In theory you can go down the differentiation route but because it is a quadratic, there is a simpler solution. The general form of a quadratic equation is y = ax2 + bx + c If a &gt; 0 then the quadratic has a minimum If a &lt; 0 then the quadratic has a maximum [and if a = 0 it is not a quadratic!] The maximum or minimum is attained when x = -b/2a and you evaluate y = ax2 + bx + c at this value of x to find the maximum or minimum value of the quadratic.