Demo entry 6336633

123

   

Submitted by anonymous on Dec 08, 2016 at 06:42
Language: C++. Code size: 372 Bytes.

#include<iostream>
using namespace std;
#include"complex.h"

int main()
{
	Complex ob1(4, 5), ob2(-3, -8);
	Complex ob3(ob1);
	Complex add = ob1 + ob2;
	Complex sub = ob1 - ob2;
	ob1.list(); cout << " + "; ob2.list(); cout << " = "; add.list();cout << endl;
	ob1.list(); cout << " - "; ob2.list(); cout << " = "; sub.list();cout << endl;
	system("pause");
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).