Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- char ime[10], prezime[15];
- int br_bod;
- FILE *ulaz, *izlaz;
- ulaz=fopen("ORispiti.txt","r");
- if (ulaz==NULL) {
- printf("greska prilikom otvaranja datoteke.");
- exit(1);
- }
- izlaz=fopen("Vise10.txt","w");
- if (izlaz==NULL) {
- printf("Greska prilikom otvaranja izlazne datoteke.");
- fclose(ulaz);
- exit(1);
- }
- while(fscanf(ulaz,"%15s %10s %2d\n",prezime,ime,&br_bod)!=EOF) {
- if (br_bod>=10) {
- fprintf(izlaz,"%-15s %-10s %2d\n",prezime, ime, br_bod);
- }
- }
- fclose(ulaz);
- fclose(izlaz);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement