You are on page 1of 1

Data Structures

1. Write an algorithm to find the largest of a set of numbers. You do not know the number of numbers.

Find Largest

Input: a, b, c

if a > b & a > c then

print “a is the largest”

if b > a & b > c then

print “b is the largest”

else

print “c is the largest”

end if

2. Write an algorithm in pseudocode that finds the average of (n) numbers.

ALGORITHM: Find average

You might also like