Advertisement
Alx09

Ex 16

May 12th, 2020
1,455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5.  
  6. int main() {
  7.     int m, n;
  8.     FILE *f;
  9.     f = fopen("in.txt", "r");
  10.     if (f == NULL) return 0;
  11.     fscanf(f, "%d%d", &n, &m);
  12.     fclose(f);
  13.     f = fopen("out.txt", "w");
  14.     fprintf(f, "%d", m * n -1);
  15.     fclose(f);
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement