Computer Science, asked by mdmahfoozalam142004, 7 months ago

Write a program that accepts three integers from user and returns median

value among them.​

Answers

Answered by RuwaisnZaid
0

Explanation:

L = []

X = STR(INPUT("ENTER A NO"))

Y = STR(INPUT ("ENTER ANOTHER NO"))

Z = STR(INPUT("ENTER A N0"))

FOR I IN X,Y,Z:

L.APPEND(I)

K = LEN(L)

IF LEN(L)%2!=0:

MEDIAN = LEN(L)+1/2 #odd

ELSE:

MEDIAN = (LEN(L)/2+LEN(L)+1/2)/2

PRINT("#',MEDIAN,"#")

Similar questions