bybi8rdanmanRed bybi8rdanmanRed
  • 08-02-2017
  • Computers and Technology
contestada

Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer variable min.

Respuesta :

kaevras
kaevras kaevras
  • 08-02-2017
You should specify what language you're using in these types of questions. Here's an example in C++, which is fairly easy to understand, so you should be able to transfer the concept to another language to problem.

int x = 2, y = 1, z = 3, min;

if (x < y && x < z)
min = x;
else if (y < x && y < z)
min = y;
else if (z < x && z < y)
min = z;
else
std::cout << "There is no minimum";
Answer Link

Otras preguntas

give reason3. Glass vessel cracks when hot water is poured.I will mark he or she brainiest if the answer is correct.​
3. The girl picked the flowers. *10 poina. The flowers is picked by the girl.b. The flowers are picked by the girl.c. The flowers was picked by the girl.d. The
need help with math probelm if do 5 stars
Can somebody help me? I have to write a reformation quick write if somebody could help me out that would be great thank you
PLS HELP!!! There are 42 new houses being built in a neighborhood. Last month, 2/3 of them were sold. This month, 2/7 of the remaining houses were sold. How man
Give the location of Paris as an ordered pair (x, y)​
Round 956 to the nearest 5
Which phase describes velocity?
THR stands for A. Threshold Heart Rate B. Target Heart Rate C. Therapeutic Heart Rate D. Timed Heart Rate
find the missing percent