cmprt.c 559 B

123456789101112131415161718192021
  1. /* cmprt.c CCMATH mathematics library source code.
  2. *
  3. * Copyright (C) 2000 Daniel A. Atkinson All rights reserved.
  4. * This code may be redistributed under the terms of the GNU library
  5. * public license (LGPL). ( See the lgpl.license file for details.)
  6. * ------------------------------------------------------------------------
  7. */
  8. #include "ccmath.h"
  9. void cmprt(Cpx * a, int m, int n, char *f)
  10. {
  11. int i, j;
  12. Cpx *p;
  13. for (i = 0, p = a; i < m; ++i) {
  14. for (j = 0; j < n; ++j, ++p)
  15. printf(f, p->re, p->im);
  16. printf("\n");
  17. }
  18. }