Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- #define N 100
- void newArq(char *nome){
- int i;
- FILE *f = fopen(nome, "w");
- srand(time(NULL));
- for(i=1; i < 1000; i++)
- fprintf(f, "%d\n", rand());
- fprintf(f, "%d", rand());
- fclose(f);
- }
- int main(){
- newArq("dados.txt");
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment