1- Write an algorithm to find the smallest from a list A[n] of numbers. Algorithm: find the Smallest Input: integer Array list [ ] of N positive integers Output: the Smallest number in list [ ] Process: smallest count list [0] 1 while (count < size of list) If (list [count] < smallest) then smallest list [count] End if count count + 1 End while return smallest **************************************************************************************************** 2- Write an algorithm in pseudocode that finds the average of numbers in list A[n]. Algorithm: find Average Input: integer Array list [ ] of N positive integers Output: Average of numbers. Process: double sum 0 double average 0 count 0 while (count < size of list) sum sum + list [Count] count count + 1 End while average sum / n return average
© Copyright 2026 Paperzz