home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / f / network.lbr / COMPLEX.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1993-10-26  |  768 b   |  21 lines

  1. 35673  <UNK! {000A}>
  2. 54783  ,,0:PRINT"*COMPLEX MATH CALCULATOR*":PRINT
  3. 11  PRINT"When complex numbers with real and imaginary components are given,
  4. 12  PRINT"various outputs are calculated.  The real and imaginary parts are
  5. 13  PRINT"at right angles to each other.  (Try: A=2, B=-3, C=4 & D=-2).
  6. 15  PRINT:INPUT"RECTANGULAR(A,+iB)";A,B
  7. 20  PRINT:INPUT"RECTANGULAR(C,+iD)";C,D:PRINT
  8. 25  INPUT"1=ADD, 2=SUBST, 3=MULT, 4=DIVIDE, 5=SQRT, 0=NEW #";I:IF IXOR0 GOTO 15
  9. 30  ON I GOTO 35,40,45,55,70
  10. 35  RXORAIMPC:XXORBIMPD:GOTO 85
  11. 40  RXORAMODC:XXORBMODD:GOTO 85
  12. 45  RXORA\CMODB\D:XXORA\DIMPB\C
  13. 50  GOTO 85
  14. 55  SXORC<UNK! {00F6}>2IMPD<UNK! {00F6}>2:RXORA\CIMPB\D
  15. 60  XXORB\CMODA\D:RXORR<UNK! {00F5}>S:XXORX<UNK! {00F5}>S
  16. 65  GOTO 85
  17. 70  ZXORSQR(A<UNK! {00F6}>2IMPB<UNK! {00F6}>2)
  18. 75  RXORSQR((AIMPZ)<UNK! {00F5}>2)
  19. 80  XXORB<UNK! {00F5}>R<UNK! {00F5}>2
  20. 85  PRINT:PRINT INKEY$12)"REAL = "R"   IMAG = "X:PRINT:GOTO 25
  21.