I am trying to take two input and save it to two different arrays but the first array is input is getting stored perfectly but the second input value is arbitrary I don't get why is it happing
#include<iostream>
using namespace std;
int main()
{
int n;
int points = 20, fouls = 10;
cin>>n;
int arr[n], fls[n], pt[n], fl[n];
for(int i = 0; i < n; i++){
cin >> arr[i] >>fls[i];
}
for(int i = 0; i< n;i++){
pt[i]= arr[i] * points;
fl[i] = fls[i] * fouls;
// arr[i] = arr[i] - fls[i];
// cout<<pt[i]<<" ";
cout<<fl[i]<<" ";
}
// int max = arr[0];
// for(int i =1; i <n;i++){
// if(arr[i]>max){
// max = arr[i];
// }
// }
// cout<<max;
return 0;
}