razvanth21

Untitled

Mar 20th, 2017
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. // citire
  2. FILE *f;
  3.  
  4. f = fopen("operatii.in", "r");
  5.  
  6. if (!f)
  7.     exit(1);
  8.  
  9. char op[16];
  10. int n;
  11.  
  12. while(fscanf(f, "%s %d", &op, &n) == 2 || fscanf(f, "%s", op) == 1)
  13. {
  14.     if (!strcmp(op, "del"))
  15.         del(...);
  16.  
  17.     else if (!strcmp(op, "move"))
  18.         move(...);
  19.  
  20.     // ... 
  21. }
Advertisement
Add Comment
Please, Sign In to add comment