Join Our Email Alerts-Subscribe
Important Note:Login & Check Your Email Inbox and Activate Confirmation Link



Enter Your Email :

Copyright Disclaimer:
Section 107 of the Copyright Act Fair Use Contents .
We are forwarding content link(s) from our website to content website & We are not serving any contents.
Main Source:Google.com.All the Content PDF link(s) is/are obtained from GoogleSearch
for the purpose of Education & Teaching Intention. Not for commercial purpose.
Technicalsymposium.com is not liable/responsible for any copyright issues.

C++ Programming Source Codes & Study Notes-Free Download


Free Download of All Study Materials & ebooks PDF-Click & Download



C++ Program for add two complex no using friend function.

#include<iostream.h>
#include<conio.h>
class Cmplx1
{
int real,imagin;
public :
void get()
{
cout<<"\n\n\tENTER THE REAL PART : ";
cin>>real;
cout<<"\n\n\tENTER THE IMAGINARY PART : ";
cin>>imagin;
}
friend void sum(Cmplx1,Cmplx1);
};
void sum(Cmplx1 c1,Cmplx1 c2)
{
cout<<"\n\t\tRESULT : ";
cout<<"\n\n\t["<<c1.real<<" + i "<<c1.imagin;
cout<<" ] + [ "<<c2.real<<" + i "<<c2.imagin;
cout<<" ] = "<<c1.real+c2.real<<" + i "<<c1.imagin+c2.imagin;
}
void main()
{
Cmplx1 op1,op2;
clrscr();
cout<<"\n\n\tADDITION OF TWO COMPLEX NUMBERS USING FRIEND FUNCTIONS\n\n";
cout<<"\n\tINPUT\n\n\t\tOPERAND 1";
op1.get();
cout<<"\n\n\t\tOPERAND 2";
op2.get();
sum(op1,op2);
getch();
}

 


Technicalsymposium.com-Free Study Materials PDF-Download




Technicalsymposium.com-Download All Study Notes PDF




Technicalsymposium.com-Free Live Support-Chat with Our Experts

Official Contact: +91-9245556793 (Whatsapp Message / SMS / Voice Call)


Our Expert team is ready to answer all your questions immediately-Feel free to speak in Tamil/English.

(Example:Events info/Lecture Notes/Off-Campus & All Jobs/Projects & All education information)

Working hrs (IST): (Morning: 10:00AM-3:00 PM) and (Evening:5:00 PM to 10:00 PM)

All Latest Question & Answer Page (FAQ)-Click here