Arithmetic/Complex: Difference between revisions

added c
(added c)
Line 38:
C := -A;
end Complex_Operations;</ada>
 
=={{header|C}}==
{{works with|C99}}
<c>
#include <complex.h>
 
void complex_operations() {
double complex a = 1.0 + 1.0I;
double complex b = 3.14159 + 1.25I;
 
double complex c;
 
// addition
c = a + b;
// multiplication
c = a * b;
// inversion
c = 1.0 / a;
// negation
c = -a;
}
</c>
 
=={{header|C++}}==
Anonymous user