For this Question: Given an array consisting of N integers, your task is to reverse every subarray of K group elements.
See example for better understanding.First line of input contains two space separated integers N and K, next line contains N space separated integers containing values of array.

Constraints:-
1 < = K < = N < =100000
1 < = Arr[i] < = 100000Print the modified array.Sample Input:-
6 2
1 2 3 4 5 6

Sample Output:-
2 1 4 3 6 5

Sample Input:-
5 3
1 2 3 4 5

Sample Output:-
3 2 1 4 5

Explanation:
Step 1: 3 2 1 4 5
No more steps can be done, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
int main(){
int n,k;
cin>>n>>k;
int a[n];
for(int i=0;i<n;i++){
    cin>>a[i];
}
int x=n%k;
for(int i=0;i<n-x;i++){
    cout<<a[(i/k)*k+(k-i%k-1)]<<" ";
}
for(int i=n-x;i<n;i++){
    cout<<a[i]<<" ";
}
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?