import java.util.Scanner;
public class Boletas {
public static void main(String[] args) {
Scanner leer = new Scanner(System.in);
System.out.println("Ingresa el numero de boletas que quieres contar");
int nboletas = leer.nextInt();
int[] boletas = new int[nboletas];
System.out.println("Ingresa el numero de boleta segun el partido");
System.out.println("Partidos :");
System.out.println("1.-PRI");
System.out.println("2.-PAN");
System.out.println("3.-PRD");
System.out.println("4.-VOTONULO");
for (int i = 0; i <= boletas.length - 1; i++) {
System.out.println("Boleta" + "" + (i + 1));
boletas[i] = leer.nextInt();
}
int countPRI = 0;
int countPAN = 0;
int countPRD = 0;
int countVN = 0;
for (int i = 0; i < boletas.length; i++) {
switch (boletas[i]) {
case 1:
countPRI = countPRI + 1;
break;
case 2:
countPAN = countPAN + 1;
break;
case 3:
countPRD = countPRD + 1;
break;
case 4:
countVN = countVN + 1;
break;
}
System.out.println("Total de votos");
System.out.println("1.-PRI = " + countPRI);
System.out.println("2.-PAN = " + countPAN);
System.out.println("3.-PRD = " + countPRD);
System.out.println("4.-VOTONULO = " + countVN);
}
}
}