fork download
  1. /*======================================================
  2. //函數名:c_comp_divide
  3. //功能描述:求複數的除法
  4. //輸入參數:a1(被除數a的結構體)
  5. //     a2(除數b的結構體)
  6. //     c(計算結果的結構體)
  7. //返回值:0(失敗),1(成功)
  8. =========================================================*/
  9. #include "stdio.h"
  10. #include "stdlib.h"
  11. #include "math.h"
  12. #include "c_comp_product.c"
  13. struct c_comp{
  14. double rmz;
  15. double imz;
  16. }c_comp;
  17. int c_comp_divide(a1,a2,c)
  18. struct c_comp *a1,*a2,*c;
  19. {
  20. double R2;
  21. if(a1 == NULL || a2 == NULL || c == NULL)
  22. {
  23. printf("(c_comp_divide)The c_comp pointer is NULL!\n");
  24. return(0);
  25. }
  26. R2 = a2->rmz*a2->rmz + a2->imz*a2->imz;
  27. c_comp_product(&a1,&a2,&c);
  28. c->rmz = c->rmz/R2;
  29. c->imz = c->imz/R2;
  30. return(1);
  31. }
  32. ~
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:12:28: fatal error: c_comp_product.c: No such file or directory
 #include "c_comp_product.c"
                            ^
compilation terminated.
stdout
Standard output is empty