fork(2) download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void) {
  5. float x, y, r, f ;
  6. scanf(" %f %f", &x, &y);
  7. if (x != 0) {
  8. r = sqrt(x*x+y*y) ;
  9. f = atan2 (y, x);
  10. printf("z = %lg *(cos(%lg) + i*sin(%lg))", r, f, f);
  11. }
  12. else printf("no answer");
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2116KB
stdin
4 2
1 0
0 0
1,2 5,4
-1  -2
-100 356


stdout
Standard output is empty