C ++ program to find the smallest of two numbers
Answers
Answered by
0
Algorithm to find smallest element of array
Let it be N. Then ask user to enter N numbers and store it in an array(lets call it inputArray). Initialize one variables minElement with first element of inputArray. Using a loop, traverse inputArray from index 0 to N -1 and compare each element with minElement.
Similar questions