#include <iostream>
using namespace std;
int main()
{
int a,b;
int arr[5][2];
for(int i = 0; i<3; i++)
{
cin >> a >> b;
for(int j=0;j<2;j++)
{
arr[i][0]=a;
arr[i][1]=b;
}
}
cout << arr;
}
I just wanted to print the whole array for the 2-d array. e.g.- Input- 1 2 2 3 4 6 Output- {{1,2},{2,3},{4,6}}