This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/cplbexam/complex/pubfun/decre.cpp

17 lines
419 B
C++

#include <complex.h>
void main( void ) {
Complex a (23.4, 28), b (25.7, 56.1);
double c = 45.6;
int d = 10;
cout << a << " - " << b << " = " << flush;
cout << ( a -= b ) << endl;
cout << b << " - " << c << " = " << flush;
cout << ( b -= c ) << endl;
// Now the value of a has been changed
cout << a << " - " << d << " = " << flush;
cout << ( a -= d ) << endl;
}