home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / WATCOM_C / WAT22.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  476 b   |  18 lines

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat22.c                                              */
  3. /*------------------------------------------------------------------*/
  4. #include <stdio.h>
  5. #include <math.h>
  6.  
  7. void main()
  8. {
  9.    struct complex value;
  10.    double result;
  11.  
  12.    value.real = -5.0;
  13.    value.imag = 12.0;
  14.    result = cabs(value);
  15.  
  16.    printf("%.2lfi %.2lfj ñº╡┤╣∩¡╚¼░ %.2lf", value.real, value.imag, result);
  17. }
  18.