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();
Raj is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''{'' and end with ''}''. Ã
Develop G-code generating software Project Description: I'm presently using Slicer on a polymer jetting 3d printer. The toolpaths were thought out for FDM printers and thus a
write c program to do the following : -fill 2 dimensional array (square matrix array with size=4). -ask the user to enter any integer number and add this number to the diagonals -o
Note: Please refer to the Subject Outline for details regarding the assessment of the advanced assignment. The Problem You are to investigate the use of data structures an
Explain string constants in c language - Escape Sequences? Illustrations are "945", "hello", "well done", "5+3". The character constant (example 'x') isn't equivalent to the st
Pointers are just numbers, representing addresses in memory. You can add to and subtract from pointers, for instance. It is pretty easy to make mistakes with pointer math, however,
in this problem you are given a board in which some of the elements are placed as shown in below diagram.each element represent a color.fill the other element in the board,such tha
At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes
At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers
Want a scraping program created Project Description: We need to hire a professional developer to scrape the site for information such as *product title *Product Price
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