Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement