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
DIA [1.3K]
3 years ago
7

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 va

riable min. Assume that all the variables have already been declared and that x, y, and z have been assigned values.
Computers and Technology
1 answer:
padilas [110]3 years ago
8 0

Answer:

The code to this question as follows:

Code:

if(x < y) //if block that check value of x less then value of y

{

if(x<z) // inner if block that check value of x less then value of z

{

min = x;  //assign value of x in min variable

}

else // inner else block when condition is false

{

min = z;  //assign value of z in min variable

}

}

else //outer else block

{

if(y<z) //if block to check value of variable y is less then value of z

{

min = y;  //assign value of y in min variable

}

else //else block

{

min = z;  //assign value of z in min variable

}

}

Explanation:

In the given question it is defined, that an integer variable " x, y,z, and min" is declared, in which variable "x,y, and z" value is defined, and the variable is used to assign a big value.

  • To check the biggest value we use the if-else statement in which, and if block check value of x is less than then the value of y if this condition is true so, inside this another if block declares, that will check if the value of x is less then z. if this is true, it will assign the value of x in min variable else it will assign the value of z in min.
  • In the outer else part, another conditional block has used, that checks if the value of y is less than then the value of z if it is true, it assigns the value of y in min else it will assign the value of z in min.
You might be interested in
What do you think of my profile picture
Gnom [1K]

ayo it's pretty sweet lma.o.

8 0
3 years ago
Read 2 more answers
Eight houses represented as cells are arranged in a straight line java int state []
monitta

Answer:

int state[] = new int[8];

8 0
3 years ago
Microsoft word is an example of utility software? <br><br>A.true <br>B.false​
monitta

Answer:

false

Explanation:

Ms word is only an application software

7 0
2 years ago
Read 2 more answers
What does NBT stand for?​
Zanzabum

Answer:

National Benchmark Test

Explanation:

7 0
3 years ago
Which game would be classified as an advergame? A. Tomb Raider B. Fifa Soccer C. Prince of Persia D. Flower
Vikentia [17]

Answer:

B

Explanation:

I think

8 0
3 years ago
Other questions:
  • If you have a list of words that you wish me to make into a bulleted list, you must first highlig or ______ The words with the c
    13·1 answer
  • True or false?
    5·1 answer
  • Anderson uses his computer and internet link to chart the movement of his favorite 46 stocks. He buys and sells according to the
    15·1 answer
  • Describe the Software Development Life Cycle. Describe for each phase of the SDLC how it can be used to create software for an E
    14·1 answer
  • A technician is training a new hire on sealing an RJ-45 connector to the end of an Ethernet cable. Which tool is the technician
    12·1 answer
  • FIND THE 6 ERRORS IN THIS RESUME 30 POINTS!!!!
    12·1 answer
  • What error occurs when you perform an illegal math operation such as divide by zero
    13·1 answer
  • The average numbers of shares a piece of content receives is known as its:
    7·1 answer
  • Goals of the project objectives
    6·1 answer
  • Why are pirated software considered a threat?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!