Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <string.h>
- using namespace std;
- int main()
- {
- FILE *r = fopen("proizvodi.txt","r");
- FILE *w = fopen("zapishi.txt","w");
- int limit;
- scanf("%d",&limit);
- int temp;
- char ime[16];
- int lager;
- int cena;
- while(fscanf(r,"%d%s%d%d",&temp,ime,&lager,&cena) != EOF)
- if(cena > limit)
- fprintf(w,"%s\t%d\t%d\n",ime,lager,cena);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement