Algorithm to find the smallest number in an array in C [closed]
Assign first element of array to smaller smaller = array[0]; Start a loop with i = 1 and compare elements with smaller. If smaller is greater than any of array element then replace it with that elment otherwise left it as it.