可以用+1E-6 調整精度問題,
例如:
int arr[1000] = {};
for (int i=0; i<n; i++){
double input; cin >> input;
arr[i] = input*100 + 1E-6;
}