| 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 | Define a class complex with two data members real & imag.#include #include classCcomplex{    private:        doublereal, img;    public:        Ccomplex(){}        Ccomplex(doubler, doublei){            real = r;            img = i;            }        friendCcomplex operator+(Ccomplex &, Ccomplex &);        friendCcomplex operator-(Ccomplex &, Ccomplex &);        friendCcomplex operator*(Ccomplex &, Ccomplex &);        friendCcomplex operator*(Ccomplex &, double);        friendostream& operator<<(ostream &, Ccomplex &);        friendistream& operator>>(istream &, Ccomplex &);    };Ccomplex operator+(Ccomplex &c1, Ccomplex &c2){    returnCcomplex(c1.real + c2.real, c1.img + c2.img);    }Ccomplex operator-(Ccomplex &c1, Ccomplex &c2){    returnCcomplex(c1.real - c2.real, c1.img - c2.img);    }Ccomplex operator*(Ccomplex &c1, Ccomplex &c2){    returnCcomplex(c1.real * c2.real, c1.img * c2.img);    }Ccomplex operator*(Ccomplex &c1, doublenum){    returnCcomplex(c1.real * num, c1.img * num);    }ostream& operator<<(ostream &Mout, Ccomplex &Oc){    returnMout<<"\n Real: "<    } voidmain(){    Ccomplex Oc;    Ccomplex Oc1(3.1, 4.1);    Ccomplex Oc2(4.2, 5.7);    doublenum= 10;    clrscr();    cout<<"\n Sum of two Complex No's:- ";    Oc = Oc1 + Oc2;    cout<    cout<<"\n\n Difference of two Complex No's:- ";    Oc = Oc1 - Oc2;    cout<    cout<<"\n\n Product of two Complex No's:- ";    Oc = Oc1 * Oc2;    cout<    cout<<"\n\n Product of Complex No with Constant:-";    Oc = Oc1 * num;    cout<    getch();    } | 
   Register your Free Domain Now!!   1)  .tk       Dot TK is a FREE domain registry for websites on the Internet. It has exactly the same power as other domain extensions, but it’s free! Because it’s free, millions of others have been using .TK domains since 2001 – which makes .TK powerful and very recognizable.  Your website will be like www.yourdomainname.tk .  It is free for 1 year. It’s a ccTLD domain whixh having the abbreviation  Tokelau.  To create a .tk domain, Visit   www.dot.tk    2) co.cc             Co.cc is completely free domain which is mostly used by blogspot bloggers because of it’s easy to use DNS system. Creating a co.cc for blogger is simple ( for instructions- “click here”). Your website will be like www.yourdomainname.co.cc .  To create a .co.cc domain, visit www.co.cc    3)   co.nr       co.nr is too like co.cc. Your website will be like  www.yourdomainname.co.nr .  You can add it for blogger also..  To create a .co.cc domain, vi...
Comments
Post a Comment
share your thoughts ....