radomes.openskiesproject.org
bybi8rdanmanRed bybi8rdanmanRed
  • 08-02-2017
  • Computers and Technology
Answered

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.

Verified Answer :

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

Related Questions

Which form of the modifier correctly completes the sentence Does Lexi like country music or rap music A well B better C best
y25x829 solve for x
Mt rushmore is located where
What is active transport
ricky found a beetle that has a body one fourth the length of the fraction strips used in problem 12 how many beetle how many beetle bodies placed end to end wo
What is the surface area of the triangular pyramid 96 square units 126 square units 135 square units 252 square units
Hi right now im doing homework about common denominators and for some reason I cant understand how to do it
Volume of 750 between 900 cubic
Which could be the resulting equation when elimination is used to solve the given system of equations 5a5b25 5a5b35
Can anyone help me with jest ions 3 and 4