10
Dec
public class Main {
public static void main(String[] args) {
int[] numbers={14,12,9,15,17,21,23,5,8,25};
int sum=0;
for(int i=0;i<numbers.length;i++){
sum+=numbers[i];
}
System.out.println("Total sum is: "+sum);
}
}
Output:
Total sum is: 149
Leave a Reply