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

Group b.. pls help me​
What is Romeo and Juliet
PLS HURRY GIVING BRAINLIEST(05.03)Bev has to cut her grandma's grass this weekend and wants to know exactly how much area she will be cutting. Calculate the are
Female organisms have ___. :a. two Y chromosomesThis answer is incorrect. b. two X chromosomes c. one X chromosome and one Y chromosome d. one Y chromosome
A country with an absolute advantage can produce a good or service ?
A 30kg bullet strikes a tree trunk of diameter 40cm at 200ms and leaves it from the opposite side at 100ms find the kinetic energy of the bullet just before it
please help and please leave a legit answer
okay okay what is emoji aaaaa​
fill in the missing values of the following number patternsa) 24;12;0;__ ; __b) -36; -25; -16; __; __​
A true false quiz with 10 questions was given to a statistics class. Following is the probability distribution for the score of a randomly chosen student. Find