Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Vectores: Dos vectores rellenos al azar
//Title of this code //clang 3.6.0 #include <stdio.h> #include <stdlib.h> int main(void) { int v[10], w[10]; int i, r; // The rand() function in <stdlib.h> returns a pseudo-random integer between 0 and RAND_MAX. // You can use srand(unsigned int seed) to set a seed. srand(time(NULL)); for (i=0; i<10; i++) { r = rand(); v[i]= r; } for (i=0; i<10; i++) { r = rand()%200; w[i]= r; } for (i=0; i<10; i++) printf("posición v[%d] = %d\n", i, v[i]); printf("\n-----------------------\n"); for (i=0; i<10; i++) printf("posición w[%d] = %d\n", i, w[i]); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Run code before/after main in C (Clang)
Graph Depth First Search
Tree and binarySearch
Día de la semana
0001
Cviceni 7 1 uloha ++upper,isupper
Vzdalenost makro inline
cv8_5
lab7
char xor
Please log in to post a comment.