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
kolezko [41]
3 years ago
14

MinMax is a function that takes five arguments and returns no value. The first three arguments are of type int. The last two arg

uments are pointers to int that are set by the function to the largest and smallest of the values of the first three parameters, respectively. x, y and z are three int variables that have been declared and initialized. big and small are two int variables that have been declared. Write a statement that sets the value of big to the largest of x, y, z and sets the value of small to the smallest of x, y, z by calling minMax.
Computers and Technology
1 answer:
Luba_88 [7]3 years ago
5 0

Answer:

#include <iostream>

using namespace std;

void MinMax(int x,int y,int z,int *max,int *min)

{

   int big,small;

   if((x>y)&&(x>z))    //to check for maximum value

       big=x;

   else if((y>x)&&(y>z))

       big=y;

   else

       big=z;

   if((x<y)&&(x<z))  //to check for minimum value

       small=x;

   else if((y<x)&&(y<z))

       small=y;

   else

       small=z;

   *max=big;   //pointer pointing to maximum value

   *min=small;     //pointer pointing to minimum value

}

int main()

{

   int big,small;

   MinMax(43,29,100,&big,&small);    

   cout<<"Max is "<<big<<"\nMin is "<<small;  //big and small variables will get value from method called

   return 0;

}

OUTPUT :

Max is 100

Min is 29

Explanation:

When the method is called from first three integers maximum will be found using the conditions imposed and maximum value will be found and similarly will happen with the minimum value.

You might be interested in
What are the best data structures to create the following items? And why?
Airida [17]

Answer:

The best structures to create the following items are

  1. ARRAY
  2. HASHMAPS
  3.  QUEUE
  4. SORTED LINK LISTS

Explanation:

The best structures to create the following items are:

  1. Array : for the storage of cards in a card game the best data structure to be used should be the Array data structure. this is because  the size of the data ( 52 cards ) is known and using Array will help with the storing of the cards values in the Game.
  2. Hashmaps : Hashmap data structure should be implemented in online shopping cart this IS BECAUSE  items can be easily added or removed from the cart therefore there is a need to map the Items ID or name to its actual database
  3. online waiting list are usually organised/arranged in a first-in-first-out order and this organization is best created using the queue data structure
  4. Sorted link lists is the best data structure used to create, store and manage online tickets. the sorted link data structure helps to manage insertions and deletions of tickets in large numbers  and it also reduces the stress involved in searching through a large number of tickets by keeping the tickets in sorted lists
3 0
3 years ago
What are the main dimensions of information systems
anastassius [24]

\huge\mathcal\colorbox{yellow}{{\color{blue}{AnSwEr~↓~↓~}}}

There are three dimensions of information systems

  • organizational
  • management
  • technology.

\huge \colorbox{blue}{hope \: it \: help \: u}

8 0
3 years ago
Web browsers are used to browse the World Wide Web. <br> True or false
irakobra [83]
It's true. When you use an adress link you can see that it begin with www and that means world wide web
8 0
3 years ago
Read 2 more answers
Cloud Kicks is undergoing a GDPR-focused implementation to ensure access to personal information data is limited to only users w
bija089 [108]

Answer:

Option A.

Explanation:

It is experiencing a GDPR-focused execution to assure only users who require full rights to a corporation's account have access to sensitive information and data. It has a design of their personal account.

So, the Consultant allows particular Account privileges to the sustainable and Sales Procedure teams through which they create Renewals and Sales Operation Account team membership roles and has sales team members allocated to the suitable customers.

5 0
3 years ago
An animation is made up of individual images called _______________.
inysia [295]

Answer:

D. Frames

Explanation:

An animation is made up of individual images called FRAMES.

The term refers to old film ribbons where each image was presented in a frame, on the long film ribbon that would be moving in front of a light to project the movie images.

A. Thumbnails: they're a small version of an image.

B. Hot spots are areas that can be clicked to link somewhere else for example.

C. Icons are small images, can be animated or not.

5 0
4 years ago
Other questions:
  • Describe a situation where it would be advantageous to use the copper tape or aluminum foil instead of the A and B push buttons
    7·2 answers
  • The field on which records are sorted is called the composite primary key.A. TrueB. False
    12·1 answer
  • Print a countdown from n to 1 The function below takes one parameter: an integer (begin). Complete the function so that it print
    8·1 answer
  • Question 4 of 5
    5·2 answers
  • Write a python program that asks the user to enter a student's name and 8 numeric tests scores (out of 100 for each test). The n
    5·1 answer
  • ____ is one of the primary operations of a computer.
    10·1 answer
  • What is the difference between a switch and a hub?
    8·1 answer
  • Many company websites are now designed to do more than just sell a product. These​ websites, known as​ __________ websites, atte
    14·1 answer
  • What do I do if my friend wants me to watch a video at my house?
    8·2 answers
  • 35 POINTS
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!