Skip to content

Instantly share code, notes, and snippets.

@ApenasGabs
Created October 22, 2021 00:24
Show Gist options
  • Save ApenasGabs/b51fa06b49441f844179be0fbbf24e9f to your computer and use it in GitHub Desktop.
Save ApenasGabs/b51fa06b49441f844179be0fbbf24e9f to your computer and use it in GitHub Desktop.
exe
int main()
{
int i, x, existe, count = 0;
printf("Quantos elementos você deseja ? ");
scanf("%i", &x);
int val[x];
for (i=0;i<x;i++){
scanf("%i", &val[i]);
}
printf("Qual elementos você deseja verificar ? ");
scanf("%i", &existe);
for (i=0;i<x;i++) {
if (val[i] == existe)
count++;
}
printf("Existem %d elementos %d no seu vetor",count,existe);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment