语法练习
#include <iostream>
#include <climits>
using namespace std;
int n, x;
int main(int argc, char** argv) {
cin >> n;
int min_val = INT_MAX, min_idx = -1;
for (int i = 0; i < n; ++i) {
cin >> x;
if (x < min_val) {
min_idx = i;
min_val = x;
}
}
printf("Minimum value: %d\n", min_val);
printf("Position: %d\n", min_idx);
return 0;
}