n the main program, the variable X
is assigned the value 2, and then the procedure FIND
is called with X
as an argument. Inside the procedure, the square root of X
is calculated.
The writeln(X)
statement outside the procedure will print the value of X
after the procedure call. Since X
was assigned the value 2 before calling the procedure, and the procedure only calculates the square root without modifying the original value of X
in the main program, the output will be:2