Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, const char *argv[])
- {
- FILE *output;
- int i;
- if(argc!=3)
- {
- fprintf(stderr, "Usage: %s name_of_output_file amount_of_elements\n", argv[0]);
- return -1;
- }
- output = fopen(argv[1], "w");
- for(i = 0; i<atoi(argv[2]); i++)
- {
- fprintf(output, "%d\n", rand());
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement