Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h> /* printf, NULL */
- #include <stdlib.h> /* srand, rand */
- #include <time.h> /* time */
- #include <iostream>
- #include <string>
- #include <stdio.h> /* printf, NULL */
- #include <stdlib.h> /* srand, rand */
- #include <time.h>
- int * popola_array()
- {
- srand(time(NULL));
- static int alberto[10];
- for(int i=0;i<10;i++){
- alberto[i]=rand();
- std::cout<< i << ": "<<alberto[i]<<"!\n";
- }
- return alberto;
- }
- int main()
- {
- int * giacomo;
- giacomo = popola_array();
- std::cout<< ": "<< *giacomo <<"!\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement