Created
October 22, 2021 00:24
-
-
Save ApenasGabs/b51fa06b49441f844179be0fbbf24e9f to your computer and use it in GitHub Desktop.
exe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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