In the vector below 300 elements, I need to store the distinct elements that occur in another vector called values. Since then I have to register how many times the i-th value of the vector values occurs in the first vector. I started to do the code of the vector of 300 values but then I do not know how to do it, thank you for the attention
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
void lernumeros(int A[]){
for(int i = 0; i <= 300; i++) {
printf("\nDigiite um valor qualquer positivo:\n");
scanf("%d", &A[i]);
if(i < 0){
printf("Numeros Negativos não são permitidos!");
break;
}
}
}
return 0;
}