Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct complexTag complex;
- struct complexTag {
- double re;
- double im;
- };
- complex add(complex z1, complex z2) {
- return z1 + z2;
- }
- int main(void) {
- complex suma(z1,z2);
- z1.re = 1;
- z1.im = 2;
- z2.re = 2;
- z2.im = 3;
- printf("z1 + z2 = %lf + %lf + (%lf + %lf)i",z1.re,z2.re,z1.im,z2.im);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment