diff --git a/struct_procedure_1.cpp b/struct_procedure_1.cpp deleted file mode 100644 index 46752978e81651ec292227e33007d018cb72bd1e..0000000000000000000000000000000000000000 --- a/struct_procedure_1.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include <iostream> - -using namespace std; - -struct cpx{ - double real; - double img; -}; - -void sum(cpx x, cpx y, cpx &z) -{ - z.real = x.real + y.real + z.real; - z.img = x.img + y.img + z.img; -} - -void multiply(cpx x, cpx y, cpx &z) -{ - z.real = x.real * y.real - (x.img * y.img); - z.img = x.real * y.img + x.img * y.real; -} - -int main() -{ - cpx x = { 0, 4 }; - cpx y = { 2, 3 }; - cpx z = { 1, -2 }; - - sum(x, y, z); - - multiply(z, y, x); - - cout << "x = (" << x.real << "," << x.img << ")" << endl; -} \ No newline at end of file