Skip to content

Instantly share code, notes, and snippets.

@ryzokuken
Created January 29, 2017 07:41
Show Gist options
  • Save ryzokuken/e9d9c28a88ddd050c81b4378dddb8b32 to your computer and use it in GitHub Desktop.
Save ryzokuken/e9d9c28a88ddd050c81b4378dddb8b32 to your computer and use it in GitHub Desktop.
struct Complex {
int real;
int imaginary;
}
struct Complex addComplex(struct Complex* a, struct Complex* b) {
struct Complex c;
c.real = a->real + b->real;
c.imaginary = a->imaginary + b->imaginary;
return c;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment