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
Hello guys. .... ............ .is a camputer that stores data and programs that people on a network can access? What is the answ
Vikentia [17]
I do t know the answer to this but i think tou can firger it iut food luck so good luck on it also I think it can be done it is Poe Poe is your answer
4 0
2 years ago
WILL GIVE BRAINLIEST AND 30 POINTS!! NEED ASAP!!!!
kotykmax [81]

Answer:

Explanation:

1. In tabletop games and video games, game mechanics are the rules that guide the player's moves or actions, as well as the game's response to them.

5.User interface is about the visual design and the information designs around the screens while the User Experience is about the whole experience and not only about the screen. User interface is mainly focused on the product while User experience on the other hand mostly focuses on the user and their journey through the product.

5 0
3 years ago
Is science fiction always set in the future
Natali5045456 [20]
Yes and No it all depends on how the author wants the poem how to be and become. Majority of the time science fiction is set for the future.
5 0
2 years ago
a _____ is a recreation of a thumbnail in a desktop publishing software, also known as a "rough". a. proof b. digital draft c. l
Dmitrij [34]
D. It’s a sketch. That is, if you talking about, an art piece.
6 0
3 years ago
Im so stuck bruh helpppppppppp
goblinko [34]

Answer:

24 is the answer hope that helped!

•w•

5 0
3 years ago
Other questions:
  • A manufacturer of machine tools creates a spreadsheet of tools and the cost for those. The spreadsheet has four fields: name of
    13·1 answer
  • Consider a channel that can lose packets but has a maximum delay that is known. Modify Protocol rdt2.1 to include sender timeout
    11·1 answer
  • In a car crash, wearing a seat belt __________________.
    5·2 answers
  • You want to configure two DHCP servers; one is running Windows Server 2012 R2, and the other is running Windows Server 2016. One
    9·1 answer
  • What dynamic would best describe the genre of rock and roll?
    10·1 answer
  • Interruption attacks are also called ___ attacks:
    8·1 answer
  • Rafael needs to add a title row to a table that he has inserted in Word. What should he do? Use the alignment options. Use the M
    14·2 answers
  • What is the location used by users to configure delegate access on their own mailboxes?
    14·2 answers
  • Technology has had
    10·1 answer
  • Interstate highway numbers Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 of 95) go north/south, an
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!