Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Create Complex number using constructor:
class complex
{
private:
int real,ima;
static int count;
public :
complex (int a,int b) //constructor
real=a;
ima=b;
}
complex() //default constructor
real=0;
ima=0;
void show()
cout<< real<<"\n"< } friend complex sum(complex ,complex); ~complex () // destructor { } }; int complex :: count=15; complex sum( complex a,complex b) { complex c3; c3.real= a.real + b.real; c3.ima= a.ima + b.ima; return c3; } void main() { complex a,b,c; clrscr(); a = complex(10,12); //constructor b= complex(12,10); c=sum(a,b); c.show(); //cout < getch(); }
friend complex sum(complex ,complex);
~complex () // destructor
};
int complex :: count=15;
complex sum( complex a,complex b)
complex c3;
c3.real= a.real + b.real;
c3.ima= a.ima + b.ima;
return c3;
void main()
complex a,b,c;
clrscr();
a = complex(10,12); //constructor
b= complex(12,10);
c=sum(a,b);
c.show();
//cout < getch(); }
getch();
Program is to find the maximum from two numbers: Program is to find the maximum from two numbers entered by the user having pointer variable as parameter void main() {
Define a class polynomial with three private data members a, b and c of type double to represent the coefficient of two degree polynomial(ax^2+bx+c). Include a constructor in a pol
Project Description: I have software written with VB that i helped design, but now the original author died,(Neil Tromp), and the software ended up in the hands of someone else!
I need help in the C++ programming assignment. I can send the files the assignment is times 3hrs.
Explain about the Constants in c language? The Constants in C refer to fixed values that don't change during the execution of a program. C has four fundamental types of constan
what is binary heap ? what is the c code for the implementation for the binary heap
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec
to calculate the amount to be paid by a customer buying yummy cupcakes for his birth day party
What is MIME? MIME - Multi-purpose Internet Mail Extensions. MIME types signifies a standard way of classifying file types over Internet. Browsers and Web servers have
A: No. (Excluding if you have an old compiler, you might have to force the new operator to throw an exception if it runs out of memory.) This turns out to be a real pain to alwa
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd