Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fajlovi 1.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <stdio.h>
- int main()
- {
- int br;
- FILE *fp, *fa;
- fp = fopen("podaci.txt", "r");
- fa = fopen("abspodaci.txt", "w");
- while (!feof(fp))
- {
- fscanf(fp, "%d", &br);
- fprintf(fa, "%d\n", abs(br));
- }
- fclose(fp);
- fclose(fa);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement