Math, asked by poojakadamab4859, 11 months ago

First line of input consists of an integer n denoting the number of elements in the array a.

Answers

Answered by mohamedabraramjad
0

Answer:

import java.util.*;

class TestClass {

public static void main(String args[] ) throws Exception {

Scanner sc = new Scanner(System.in);

int n=sc.nextInt();

int sum=0;

int arr[]=new int[n];

for(int i=0;i<n;i++){

arr[i]=sc.nextInt();

sum=sum+arr[i];

}

System.out.println((sum/n)+1);

}

}

Similar questions