fork download
  1. #include <stdio.h>
  2. stampavect(int A[], int N){
  3. for(int i=0; i<N; i++){
  4. printf("%d \n", A[i]);
  5. }
  6. }
  7. int main(void) {
  8. // your code goes here
  9. int s;
  10. scanf("%d", &s);
  11. int vect[s];
  12. for(int i=0; i<s; i++){
  13. vect[i]=(rand()%10);
  14. }
  15. int N=sizeof(vect)/sizeof(vect[0]);
  16. stampavect(vect, N);
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 5320KB
stdin
10
stdout
3 
6 
7 
5 
3 
5 
6 
2 
9 
1