1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ray Of Light [21]
4 years ago
12

Write the definition of a function minmax that has five parameters. the first three parameters are integers. the last two are se

t by the function to the largest and smallest of the values of the first three parameters. the function does not return a value. the function can be used as follows: int a=31, b=5, c=19 big, small; minmax(a,b,c,&big,&small);
Mathematics
1 answer:
Nitella [24]4 years ago
8 0
Hello,


function minmax(int p1,int p2,int p3, int adr_big, int adr_small)
{ int mini=p1,maxi=p1;
 if (p1>p2)   {mini=p2;}
else            {maxi=p2;};

if (p3>maxi) maxi=p3;
if (p3<mini) mini=p3;
*adr_big=maxi;
*adr_small=mini;
};

// main
int a=31,b=5,c=19,big,small;
minmax(a,b,c,&big,&small);





You might be interested in
Please help me solve this problem?
Luden [163]

The problem statement gives a relation between the amount removed from one bag and the amount removed from the other. It asks for the amount remaining in each bag. Thus, there are several choices for variables in this problem, some choices resulting in more complicated equations than others.

Let's do it this way: let x represent the amount remaining in bag 1. Then the amount removed from bag 1 is (100-x). The amount remaining in bag 2 is 2x, so the amount removed from that bag is (100-2x). The problem statement tells us the relationship between amounts removed:

... (100 -x) = 3(100 -2x)

... 100 -x -3(100 -2x) = 0 . . . . . . subtract the right side

... 5x -200 = 0 . . . . . . . . . . . . . . eliminate parentheses and collect terms

... x -40 = 0 . . . . . . . . . . . . . . . . .divide by 5

... x = 40 . . . . . . . . . . . . . . . . . . . add 40

  • 40 kg is left in the first bag
  • 80 kg is left in the second bag

_____

<u>Check</u>

The amount removed from the first bag is 60 kg. The amount removed from the second is 20 kg. The amount removed from the first bag is 3 times the amount removed from the second bag, as described.


4 0
3 years ago
X to the power of 2 minus 6x plus 5 = 0
aalyn [17]

Answer:

x equals 1 and 5

Step-by-step explanation:

x^2-6x+5

Factor: (x-1) (x-5)

The Zeroes: 1 and 5

The zeroes are the numbers that make the equation equal to zero.

5 0
4 years ago
Which is the most reasonable estimate for the depth of a lake: 6 millimeters,6 centimeters, or 6 meters? explain?
aniked [119]
6 meters, both mm and cm are too small to be reasonable, as lakes are deep enough to have boats on and to swim in.
7 0
3 years ago
Helppp!!!! please!!!
Vitek1552 [10]

Answer:

d. 15 square yard

Step-by-step explanation:

area \: of \: shape \\  =  \frac{1}{2}  \times base \times height \\  \\  =  \frac{1}{2}  \times 10 \times 3 \\  \\  =  \frac{1}{2}  \times 30 \\  \\  = 15 \:  {yd}^{2}

4 0
3 years ago
Read 2 more answers
3m ≤ –9 solve the inequality
erica [24]

ANSWER: The inequality form is: m <u><</u> -3

6 0
2 years ago
Other questions:
  • Help with this!! Extra points
    11·1 answer
  • Complete the square to solve the equation below.<br> x2 - 10x - 4 = 10
    14·2 answers
  • Four times a number +3 is the same as 5+ the number.
    6·1 answer
  • Making handcrafted pottery generally takes two major steps: wheel throwing and firing. The time of wheel throwing and the time o
    7·1 answer
  • What is the answer to this question some one please help me (7−b)+(3b+2)
    6·2 answers
  • Which is a simplified form of the expression 3(m + 1) + 2m?
    10·2 answers
  • (05.05) Which of the following inequalities matches the graph? (1 point)​
    5·1 answer
  • In physics class, Carrie learns that a force, F, is equal to the mass of an object, m, times its acceleration, a. She writes the
    14·2 answers
  • After sales tax a 33 dollar photo album cost 35.97 dollars. What is the sales tax percentage
    13·1 answer
  • 3x+5y= -9<br> Y= 2x-7<br> Use substitution to solve the system
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!