<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>c++ complex | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/c-complex/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sun, 04 Apr 2010 14:04:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>C++ class program to perform complex arithmetic using operator overloading</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-class-program-to-perform-complex-arithmetic-using-operator-overloading/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-class-program-to-perform-complex-arithmetic-using-operator-overloading/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 04 Apr 2010 14:04:26 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[operator overloading]]></category>
		<category><![CDATA[complex numbers]]></category>
		<category><![CDATA[complex arithmetic]]></category>
		<category><![CDATA[c++ complex]]></category>
		<category><![CDATA[add complex numbers]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1142</guid>

					<description><![CDATA[<p>Write a program to perform complex arithmetic using operator overloading #include #include #include #include class complex { int real; float image; public: void getdata() { coutreal; coutimage; } void operator + (complex); void operator - (complex); }; void complex :: operator + (complex c1) { complex temp; temp.real=real+c1.real; temp.image=image+c1.image; if (temp.image>=0); { cout</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-class-program-to-perform-complex-arithmetic-using-operator-overloading/">C++ class program to perform complex arithmetic using operator overloading</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Write a program to perform complex arithmetic using operator overloading</p>
<pre lang="cpp">
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<process.h>
class complex
{
	int real;
	float image;
	public:
	void getdata()
	{
		cout<<"\n enter the real part of the complex";
		cin>>real;
		cout<<"\n enter the imaginary part of the complex";
		cin>>image;
	}
	void operator + (complex);
	void operator - (complex);
};

void complex :: operator +  (complex c1)
{
	complex temp;
	temp.real=real+c1.real;
	temp.image=image+c1.image;
	if (temp.image>=0);
	{
		cout<<"\n complex no. after addition:";
		cout<<temp.real<<"+"<<temp.image<<"i";
	}
	else
	{
		cout<<"\n complex no. after addition ";
		cout<<temp.real<<temp.image<<"i";
	}
}
void complex ::operator-(complex c1)
{
	complex temp;
	temp.real = real-c1.image;
	temp.image= image-c1.image;
	if (temp.image>=0)
	{
		cout<<"\n complex no. after subtraction";
		cout<<"\n temp.real<<"+"<<temp.image<<"i";
	}
	else
	{
		cout<<"\n complex no. after subtraction";
		cout<<temp.real<<temp.image<<"i"
	}
}
void main()
{
	clrscr();
	comp.ex c1, c2;
	int n;
	do 
	{
		cout<<"\n 1. Input data for complex no. ";
		cout<<"\n 2. Addition of complex no. ";
		cout<<"\n 3. Subtraction of complex no. ";
		cout<<"\n 4. Quit";
		cout<<"\n Enter your choice";
		cin>>n;
		switch(n)

		{ 
			 case1:
			 cout<<endl<<"\n Enter the data for First Complex No......";
			 cl.getdata();
			 cout<<endl<<"\n Enter the data for seconds Complex No.....";
			 c2.getdata();
			 clrscr();
			 break;
			 
			 case 2;
			 cl+c2;
			 getch();
			 clrscr();
			 break;
			 
			 case 3:
			 cl-c2;
			 getch();
			 clrscr();
			 brak;

			 case 4:
			 exit91);
			 break;
			}
		} while (n!=4);
     getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-class-program-to-perform-complex-arithmetic-using-operator-overloading/">C++ class program to perform complex arithmetic using operator overloading</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-class-program-to-perform-complex-arithmetic-using-operator-overloading/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
