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();
#exercise
get the solution
Example for Register Storage Class - computer programming? main() { register int i; for (i=0; i { ............... ............... } } /* block exit will free the register
find area under the curve y=f(x) between x=a &y=b integrate y=f(x)
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
A skilled programmer is required to build a standalone module to extract, parse and store in database tables, word count data from web pages and RSS feeds. The module can take R
Define Four Facilities Provided by C Language Preprocessor? The C language preprocessor provides four separate facilities that you can use as you see fit: Inclusion
#q•Design and code a new function that accepts as parameters the gross pay by value and the federal tax, state tax, local tax, SS tax, and net Pay by reference. Calculate the taxes
Program to draw a circle: int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int midx, midy; int radius = 100;
I need plugin for amibroker using c++ Project Description: Need to prepare plugin for amibroker using c++. Should be system bound after installing. System should show based o
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