/******************************************************************************

Welcome to GDB Online.
  GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, 
  C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS
  Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/
#include <stdio.h>
#define QTDE_VOTOS 1000

void main(){
    int voto;
    int votos[QTDE_VOTOS];
    int iCont;
    
    for(iCont = 0; iCont < QTDE_VOTOS; iCont++)
        votos[iCont] = 0;
        
    do{
        printf("Informe a sua proposta preferida \\:> ");
        scanf("%d", &voto);
        if(voto >= 0 && voto < QTDE_VOTOS)
            votos[voto]++;
    }while(voto >= 0);
    
    for(iCont = 0; iCont < QTDE_VOTOS; iCont++)
        if(votos[iCont] > 0)
            printf("Votos na proposta %d: %d\n", iCont, votos[iCont]);

    return;
}
