Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void kolos1()
- {
- FILE *fp;
- FILE *fp2;
- fp = fopen("numery.txt", "r");
- fp2=fopen("dni.txt", "w");
- //fseek(fp, -10,SEEK);
- int x;
- int wynik = fscanf(fp, "%d", &x);
- while (wynik!=EOF)
- {
- printf("%d", x);
- if (x <= 7)
- {
- fprintf(fp2, "%d sobota\n",x);
- }
- else
- {
- fprintf(fp2, "zly wynik\n");
- }
- wynik=fscanf(fp, "%d", &x);
- }
- //printf("%d", x);
- fclose(fp);
- //FILE *fp;
- //fp = fopen("file.txt", "a+");
- //fprintf(fp, "Ala ma kota");
- //fclose(fp);
- //return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement