SHARE
TWEET

Untitled

a guest Jun 15th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <complex.h>
  4.  
  5. int main()
  6. {
  7.  
  8.     double complex z1 = 5.0 - 6.0 * I;
  9.     double complex z2 = 3.0 + 4.0 * I;
  10.  
  11.     printf("The formula is (%.2f - %.2fi) / (%.2f + %.2fi) = ?\n",
  12.            creal(z1),
  13.            cimag(z1),
  14.            creal(z2),
  15.            cimag(z2));
  16.     printf("The answer is %.3f + %.3fi", (z1)/(z2));
  17.  
  18.     getchar();
  19.  
  20.     return 0;
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top