For this Question: Given an array of N elements, your task is to update every element with multiplication of previous and next elements with following exceptions:-
a) First element is replaced by multiplication of first and second.
b) Last element is replaced by multiplication of last and second last.

See example for more clarityFirst line of input contains the size of array N, next line contains N space separated integers denoting values of array.

Constraints:-
2 < = N < = 100000
1 < = arr[i] < = 100000Print the modified arraySample Input :-
5
2 3 4 5 6

Sample Output:-
6 8 15 24 30

Explanation:-
{2*3, 2*4, 3*5, 4*6, 5*6}

Sample Input:-
2
3 4

Sample Output:-
12 12, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;

int main()
{

int n;
cin>>n;
long long b[n],a[n];
for(int i=0;i<n;i++){
    cin>>a[i];
}
for(int i=1;i<n-1;i++){
    b[i]=a[i-1]*a[i+1];
}
b[0]=a[0]*a[1];
b[n-1]=a[n-1]*a[n-2];
for(int i=0;i<n;i++){
    cout<<b[i]<<" ";}

}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?