Write a program that accepts three integers from user and returns median
value among them.
Answers
Answered by
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
English,
3 months ago
Math,
3 months ago
Social Sciences,
7 months ago
Economy,
1 year ago
Computer Science,
1 year ago