fork download
  1. #include "c_comp.h"
  2. #include "stdio.h"
  3. #include "stdlib.h"
  4. #include "math.h"
  5. #include "c_comp_product.c"
  6. #include "c_comp_divide.c"
  7. void main()
  8. {
  9. struct c_comp a,b,c,d;
  10. a.rmz=7.0;
  11. a.imz=3.0;
  12. b.rmz=2.3;
  13. b.imz=-4.5;
  14. if(c_comp_product(&a,&b,&c))
  15. {
  16. printf("乘法結果為:");
  17. printf("%1.5f+j%1.5f\n",c.rmz,c.imz);
  18. }
  19. if(c_comp_divide(&a,&b,&d))
  20. {
  21. printf("除法結果為:");
  22. printf("%1.5f+j%1.5f\n",d.rmz,d.imz);
  23. }
  24. }
  25.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:20: fatal error: c_comp.h: No such file or directory
 #include "c_comp.h"
                    ^
compilation terminated.
stdout
Standard output is empty