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.