Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Vectores: buscar valor en array
//Title of this code //clang 3.6.0 #include <stdio.h> #include <stdlib.h> #define TAM 100 int main(void) { int v[TAM]; int i, lo_encontre=0; int valor=55; srand(time(NULL)); for (i=0; i<TAM; i++) v[i]=rand() % TAM; for (i=0; i<TAM; i++) printf("%d, ", v[i]); printf("\n\n"); for (i=0; i<TAM && lo_encontre==0; i++) if (v[i]==valor) lo_encontre=1; if (lo_encontre) printf("\n Lo encontré! :)"); else printf("\n No lo encontré :("); return 0; }
run
|
edit
|
history
|
help
0
mallocpole
Code
SureshLabLive
lab7_OOP 0.2
Linked list: Traverse and insert
funny stack overflow
pattern1
Bucles: Ver si un número es primo
char xor
Kód