Question #42791

write an algorithm to find the smallest number from ten numbers

Expert's answer

`#include <stdio.h>`

int main() {

int array[10];

int min = 0;

printf("Please input 10 integers\n");

scanf("%d", &array[0]);

min = array[0] ;

for ( int i = 1; i < 10; i++ ) {

scanf("%d", &array[i]);

if ( array[i] < min ) {

min = array[i];

}

}

printf("Here is our minimum %d\n", min);

}

## Comments

## Leave a comment