This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
// ComplexNums.cpp : Defines the entry point for the console application.
// This program calculates with complex numbers using addtion, subtraction and multiplication.
using namespace std;
//Complex number calculator class
Complex(); //Constructs a complex object initialized to 0+0i
Complex(double r,double i); //Construcs an initialized complex object
// Input and output
void print(ostream& out); //prints a complex number to a stream in the form a+bi
void get(istream& in); //reads in a complex number from a stream in the form a+bi
friend Complex multiply(const Complex& first, const Complex& second);
friend Complex plus(const Complex& first,const Complex& second);
//like multiply only adds
friend Complex minus(const Complex& first,const Complex& second);
//subtracts this minus second
// Beginning of main function
int _tmain(int argc, _TCHAR* argv)
This is only a preview of the solution. Please use the purchase button to see the entire solution