Probably the simplest way is to sort your array of numbers and then pick out the first two.
Two simple algorithms:
Insertion sort
Selection sort
Type: Posts; User: helloworld922
Probably the simplest way is to sort your array of numbers and then pick out the first two.
Two simple algorithms:
Insertion sort
Selection sort