fork download
  1. #include "stdio.h"
  2. #include "stdlib.h"
  3. #include "math.h"
  4. struct c_comp{
  5. double rmz;
  6. double imz;
  7. }c_comp;
  8. int c_comp_product(a1,a2,c)
  9. struct c_comp *a1,*a2,*c;
  10. {
  11. double p,q,s;
  12. if(a1 == NULL || a2 == NULL || c == NULL)
  13. {
  14. printf("(c_comp_product)The c_comp pointer is NULL!\n");
  15. return(0);
  16. }
  17. p = a1->rmz*a2->rmz;
  18. q = a1->imz*a2->imz;
  19. s = (a1->rmz + a1->imz)*(a2->rmz + a2->imz);
  20. c->rmz = p - q;
  21. c->imz = s - p - q;
  22. return(1);
  23. }
  24.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i486-linux-gnu/4.7/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty