Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //346
- #include <cstdio>
- #include <cmath>
- int main(void) {
- FILE* fin = fopen("input.txt", "r");
- FILE* fout = fopen("output.txt", "w");
- int a, b, c;
- fscanf(fin, "%d%d%d", &a, &b, &c);
- fclose(fin);
- fprintf(fout, "%d\n", (int)(abs(a - b) + abs(b - c)));
- fclose(fout);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement