Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void) {
- FILE *in = fopen("file1.txt", "r");
- FILE *out = fopen("file2.txt", "w");
- char buf[BUFSIZ];
- int n, price;
- fgets(buf, BUFSIZ, in); // ignore header
- while (~scanf("%d %d", &n, &price))
- fprintf(out, "%d\n", (int) (n * price * 1.05));
- fclose(in);
- fclose(out);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement