1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <stdio.h> void main() { int n, num, min = 1000001, max = –1000001; scanf(“%d”, &n); for (int i = 1; i <= n; i++) { scanf(“%d”, &num); if (num > max) max = num; if (num < min) min = num; } printf(“%d %d”, min, max); } | cs |