0
Follow my code below, however does not return correct the result, if I put as input 2, 2, 3 was to appear 12, but appears 6
public class Exercicio2 {
@SuppressWarnings("unused")
public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
int i = 0;
int[] soma = new int[3];
int numero1, numero2 = 0;
int total = 0;
while(i < 3){
System.out.println("Informe um numero[" + i + "]");
soma[i] = entrada.nextInt();
soma[i] += soma[i];
total = soma[i];
i++;
}
System.out.println(total);
}
}