I have this exercise here from college:
Write a java program that receives two size vectors and then indicates how many equal numbers there are between these two vectors.
I do not know how to develop logic, for now the code is just reading the arrays:
package vetores2;
import java.util.Scanner;
public class ex02 {
public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
int[] vetor = new int[10];
int[] vetor2= new int[9];
int totalIgual = 0;
System.out.println(" Insira os valores do primeiro vetor");
for(int i = 0; i < vetor.length; i++) {
vetor[i] = entrada.nextInt();
}
System.out.println(" Insira os valores do segundo vetor");
for(int i = 0; i < vetor2.length; i++) {
vetor2[i] = entrada.nextInt();
}
From there I'm not sure how to continue ...