Write function procedure to input three different numbers and find the middle number.
1 Answer
DECLARE FUNCTION MID (X, Y, Z)
CLS
INPUT "ENTER THREE NUMBERS:"; X, Y, Z
PRINT "THE MIDDLE NUMBER:"; MID (X, Y, Z)
END
FUNCTION MID (X, Y, Z)
IF (X < Y AND X > Z) OR (X > Y AND X < Z) THEN M = X
IF (Y < X AND Y > Z) OR (Z > Y AND Z < X) THEN M = Y
IF (Z < Y AND Z > X) OR (Z > Y AND Z < X) THEN M = Z
MID = G
END FUNCTION
-
Who is a system analyst? What are the characteristics of system analysts? 1
-
What are the different stages of the system development life cycle (SDLC) 1
-
What do you understand about AI? What are the negative and positive aspects of AI in society? 1
-
How does an AI application work? Can a computer really think with the aid of AI? 1