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();
Want an EA project for Jack Bsher Project Description: New EA game Skills required Android, C++ Programming, PHP, Metatrader, SQL
#include #include #include #include #include class Employee { private: char *Name; //Set them as pointers... int IdNumber; char *Department; char *Position; public: voi
Project Description: I am trading binary options and need my signals that are sent to me via email to be sent to my followers via an RSS feed I have no idea how rss feeds imp
Write a program to determine V c for a given value of time (t) #include stdio.h #include math.h void main() { char prompt; float vs,cr,t,vc; /* input time */
Write a C program "team.c" that maintains information for a soccer team. The program will allow you to add and delete players from your team, to search your team for players by nam
A: Multiple providers of libraries might employ common global identifiers causing a name collision whereas an application attempt to link with two or more such libraries. The names
Dynamic Initialization of objects: It is initializing the objects by passing the valued to the constructor from the user input or other means. Through cin operator a value
Question 1 . Write a brief note on Aggregation Question 2 . Discuss briefly on constructors Question 3 . What are the important advantages of Inheritance? Question 4 .
: Write a program that prompts the user to enter five digit positive numbers. The program then outputs the digits of the number one digit per line. Eg if the user enters 32456, th
What is Ms dos?
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