Computer Science, asked by shahbaz99shaikh77, 5 months ago

What will be the output of the following pseudo code, if x=10, y=12, z=8, num=0?
1735931160
Integer X, Y, Z, num
1735931160
17359
num = X
End if
if y< X AND y <z
num = y
End if
1735931160 35
ifz<x AND z<y
num = Z
1735931160 35
17359
End if
Print num
1603
12
60 35
10.35
x<z​

Answers

Answered by Rajputritik
0

Answer:

આ આ hvwkd આવૃષ્ટિqcdkffjctwdhchfjchdjfhrhfyf

Answered by pruthaasl
0

Answer:

The output of the given pseudo code will be 8.

Explanation:

  1. The given program finds the smallest of three numbers and displays them on the screen.
  2. To find the smallest number among the three, each number is compared with the other two numbers. To do this, the if statement is used.
  3. First, x is compared to y. Since it is a boolean expression, the result will either be 1 or 0. Next, x will be compared to z. Being a boolean expression, this will also give either 1 or 0 as the result.
  4. The results of the two expressions are then logically ANDed. If x is smaller than both y and z, i.e., if the result of both expressions is 1, then only x is the smallest among the three.
  5. In such a case, the result of logical ANDing will be 1. The value of x is then assigned to the variable num.
  6. If the result of logically ANDing is 0, it implies that x is not the smallest among the three.
  7. In that case points 3 to 6 are repeated for y and z.
  8. In the end, the value of the smallest variable is assigned to variable num and this value is printed as the output.
  9. Of the given numbers x=10, y=12, and z=8, z is the smallest.

Therefore, after successful execution of the program, 8 is printed.

#SPJ3

Similar questions