#include <stdio.h>
int findMin(int n, int tab[]) {
int min = tab[0];
for (int i = 1; i < n; i++) {
if (tab[i] < min) {
min = tab[i];
}
}
return min;
}
int findMax(int n, int tab[]) {
int max = tab[0];
for (int i = 1; i < n; i++) {
if (tab[i] > max) {
max = tab[i];
}
}
return max;
}
int main() {
int tab[10] = {8, 2, 9, 10, 5, 4, 2, 7, 18, 0};
int n = 10;
int min = findMin(n, tab);
int max = findMax(n, tab);
printf("Min: %d\n", min);
printf("Max: %d\n", max);
return 0;
}