-5
Given a sequence of N numbers between 0 and 100. Determine the highest frequency value.
Follow what I’ve done so far:
#include <stdio.h>
#define max 100
int main()
{    
    int vetor[max],i,j,frequencia=0,maior=0,tamanho_vetor,cont=0;    
    scanf("%d",&tamanho_vetor);
    if(tamanho_vetor>=1 && tamanho_vetor<=1000000)
    {
        for(i=0; i<tamanho_vetor; i++)    
        {
            scanf("%d",&vetor[i]);
           /* Como vou fazer a comparação, para achar o numero que mais aparece e quantas vezes ele aparece? */
                 if(vetor[i]==)    
                {
                    cont++;
                    frequencia ;
                }                
        }
        printf("%d %d\n",frequencia,cont);
    }
    else
        return 0;    
}
Young man, playing only the enunciation doesn’t help much in understanding your difficulty, click EDIT, add what you’ve tried and explain where you’re having trouble.
– user28595
OK I’ll edit the question
– Rhuan
Just don’t need to write in high box, no need.
– user28595
Okay, thanks for the tip!
– Rhuan