StoneHaos

346

Nov 2nd, 2019
164
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //346
  2. #include <cstdio>
  3. #include <cmath>
  4.  
  5. int main(void) {
  6.     FILE* fin = fopen("input.txt", "r");
  7.     FILE* fout = fopen("output.txt", "w");
  8.  
  9.     int a, b, c;
  10.     fscanf(fin, "%d%d%d", &a, &b, &c);
  11.     fclose(fin);
  12.     fprintf(fout, "%d\n", (int)(abs(a - b) + abs(b - c)));
  13.     fclose(fout);
  14.     return 0;
  15. }
RAW Paste Data