Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5.  
  6. using namespace std;
  7.  
  8. int * iniciararreglo();
  9.  
  10. int main()
  11. {
  12. int a[100];
  13. *a=iniciararreglo();
  14.  
  15.  
  16.  
  17. system("PAUSE");
  18. return 0;
  19. }
  20.  
  21. int * iniciararreglo()
  22. { int num,arreglo[100];
  23. srand(time(NULL));
  24.  
  25. for (int i=0;i<=99;i++)
  26. { num=0+ rand()%(100);
  27. arreglo[i]=num; }
  28. return *arreglo; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement