I am stuck at this part right now with adding the groups together. So like, Array1 A + Array2 A Array1 B + Array 2 B
This is my code:
import java.util.*;
import java.util.Arrays;
public class Math {
public static final int ARRAY1 = 5;
public static final int ARRAY2 = 5;
public static void main(String[] args) {
int de;
de = 1;
System.out.println("Welcome! This program will assist you in\n 1) Adding groups of numbers\n 2) and subtracting a group of numbers\nPlease enter the number of which you need help with!");
Scanner keyboard = new Scanner(System.in);
op = keyboard.nextInt();
if (op == 1) {
System.out.println("****Addition****\nAwesome! Please insert all the numbers for your first group of numbers!");
System.out.println("Enter "+ARRAY1+"");
int[] array = new int[ARRAY1];
for(int i=0;i<array.length;i++)
{
System.out.println("Enter value "+i);
array[i] = keyboard.nextInt();
}
System.out.println("Great! Now please enter your "+ARRAY2+" other group numbers!");
int[] array1 = new int[ARRAY2];
for(int i=0;i<array.length;i++) {
System.out.println("Enter value "+i);
array1[i] = keyboard.nextInt();
}
}
}
}