Write an algorithm (pseudocode) to find the maximum element in an array? What is the basic operation in this problem?
Answers
Answered by
0
Explanation:
*/* IT MEANS THE NO OF ELEMENTS IN ARRAY = ITS LENGTH */*
BY THIS
L = EVAL(INPUT("ENTER A LIST"))
LENGTH = LEN(L)
COUNT = 0
FOR I IN L:
COUNT+=1
IF COUNT==LENGTH:
PRINT ("MAXIMUM ELEMENTS")
ELSE:
PRINT ("NOT MAXIMUM ELEMENTS")
Similar questions