i am working on a program to add numbers using an array. I have completed a lot of it but am troubled at the last part adding the actual numbers in the code. Here is my code.
public static void main (String[] args) {
Scanner input= new Scanner(System.in);
System.out.println("Enter size of array");
int n= input.nextInt();
int[] x= new int[n];
System.out.println("Enter Array nums");
for(int i=0;i<n;i++){
x[i]= input.nextInt();
}
}
+operator or+=operator.