import java.util.Arrays;
class Main {
public static void main(String[] args) {
int[] numbers= {1,2,3,4,5,6,7,8,9,10};
int evenTotal=0, oddTotal=0;
//print all of the even numbers
for(int i=0; i<numbers.length; i++){
if(numbers[i]%2 == 0){ //check remainder of 0
evenTotal+=numbers[i];
System.out.print(" "+numbers[i]);
}
}
System.out.println(" = "+evenTotal);
//print all of the odd numbers
for(int i=0; i<numbers.length; i++){
if(numbers[i]%2 != 0){ //check if there is a remainder
oddTotal+=numbers[i]; //add element value to total
System.out.print(" "+numbers[i]);
}
}
System.out.println(" = "+oddTotal);
}
}