I've searched around, but I haven't found anything about my question.
I want create an algorithm in C that finds the smallest number in an array that can hold 10 values.
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void) {
    int array[10];
    int i, smaller;
    srand(time(NULL));
    for (i = 0; i < 10; i++) {
        array[i] = rand() % 100 + 1;
    }
    // Find smaller number in the array
    for (i = 0; i < 10; i++) {
        ...
    }
    printf("Smaller: %d\n", smaller);
    return 0;
}
Any tips on how can I do?
 
     
     
     
    