Created
February 28, 2017 17:57
-
-
Save prehensilecode/c0c8de06dec4661bc8f5d5c8857be399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <complex.h> | |
int main(void) | |
{ | |
float complex c = 3.0 + 4.0 * I; | |
long d; | |
d = c; | |
printf ("%f %+fi\n", creal(c), cimag(c)); | |
printf("%ld\n", d); | |
c = 3.0 - 4.0 * I; | |
d = c; | |
printf ("%f %+fi\n", creal(c), cimag(c)); | |
printf("%ld\n", d); | |
return (0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment