Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- int main(void) {
- unsigned n, i = 0, v[] = { 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 197, 199, 311, 337, 373, 719, 733, 919, 971, 991, 1193, 1931, 3119, 3779, 7793, 7937, 9311, 9377, 10002 };
- FILE *f;
- f = fopen("in.txt", "r");
- fscanf(f, "%u", &n);
- fclose(f);
- f = fopen("out.txt", "w");
- while(v[i] < n)
- fprintf(f, "%d ",v[i++]);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment