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]
2 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]2 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
By using the search functionality within a twitter stream, users can filter for:
rosijanka [135]
By using the search functionality within a twitter stream, users can filter for: Tweets containing keywords and key phrases, Tweets from specific users, Tweets containing @mentions, Tweets from specific locations.  <span>The secret to using Twitter effectively is using the Twitter lists. </span>Each Twitter list you create, gives you a different Twitter stream, customized to your liking. It will only include tweets sent out by those accounts you have added to the list
6 0
3 years ago
The programming interface between an application program and the dbms is usually provided by the
Inessa05 [86]
The Data Access API.
8 0
2 years ago
READ CAREFULLY! There is a difference between moving and copying files.a. Create a directory named . For example, mine would be
OleMash [197]

Answer:

b

Explanation:

8 0
2 years ago
Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
kumpel [21]

Explanation:

hope this help here is the answer

3 0
3 years ago
When you’re in the Normal view, what are the visible panes?
zheka24 [161]

a

pleas give branlest

6 0
3 years ago
Read 2 more answers
Other questions:
  • Define the following terms:<br><br> - pigment<br> - vehicle<br> - binder<br><br> plz help
    12·2 answers
  • Studying MyMagic+ helps one understand the costs associated with information systems deployment at scale. According to your read
    12·1 answer
  • You have noticed that one of your DNS servers has possibly been compromised. You believe that a cached DNS entry for your domain
    8·1 answer
  • Heidi uses her computer to write articles for a newspaper. She uses a program to listen to the articles before she submits them
    5·1 answer
  • Select the correct answer from the drop-down menu.
    15·2 answers
  • Help plz. due yesterday
    13·1 answer
  • Explains why we use tables in documents; and is at least three sentences long in word office 360​
    15·1 answer
  • Drag the tiles to the boxes to form correct palrs.
    9·1 answer
  • "code is broken down by the computer until it is in _____and is a very long series of ons and offs
    11·2 answers
  • Write a while loop that continues to increment uservalue by 5 as long as uservalue is less than 0.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!