For this Question: Given an array Arr of N integers, your task is to print the sum of elements present at even places and print the product of elements present at the odd places.

Note:- Consider the first element to start from 1.The first line of input contains a single integer N, the next line of input contains N space- separated integers depicting the values of the array.

Constraints:-
1 <= N <= 50
1 <= Arr[i] <= 5Print the sum of elements present at even places and print the product of elements present at the odd places separated by a space.Sample Input:-
5
1 2 3 4 5

Sample Output:-
6 15

Explanation:-
Sum = 2 + 4
Product = 1*3*5

Sample Input:-
2
4 6

Sample Output:-
6 4, I have written this Solution Code: 
import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int Arr[] = new int[n];
		for(int i=0;i<n;i++){
		    Arr[i] = sc.nextInt();
		}
		int sum=0;
		int product=1;
		for(int i=0;i<n;i++){
		    if(i%2==0){
		        product*=Arr[i];
		    }
		    else{
		        sum+=Arr[i];
		    }
		}
		System.out.print(sum+" "+product);
       
	    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?