The core of the code just needs to create the array, e.g. with
int arr[] = new int[100];
and then fill it in a for loop, e.g. with
for (i = 0; i<100; i++) arr[i] = i+1;
Note that array indices count from zero, but you want to fill starting from one.