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!
Define a complex number in c program:
class complex
{
private:
int real,ima;
public :
void input();
friend complex sum(complex,complex);
void show();
};
void complex:: show(void)
cout << "real part ="<< real << "\nThe imaginary part ="< } void complex ::input() { cout<<"enter the real and imaginary part\n"; cin >> real >> ima; } complex sum( complex a,complex b) { complex c; c.real= a.real + b.real; c.ima= a.ima + b.ima; return c; } void main() { complex a,b,c; clrscr(); a.input(); b.input(); c=sum(a,b); c.show(); getch(); }
}
void complex ::input()
cout<<"enter the real and imaginary part\n";
cin >> real >> ima;
complex sum( complex a,complex b)
complex c;
c.real= a.real + b.real;
c.ima= a.ima + b.ima;
return c;
void main()
complex a,b,c;
clrscr();
a.input();
b.input();
c=sum(a,b);
c.show();
getch();
Program is to create a file student.dat: Program is to create a file student.dat which contains all name, roll_no,marks(5 sub) and percentage class student {
How would you print the values of the variables words and lines so they appear in the form: There were 6040 words and 680 lines. Here, 6040 and 680 represent the values of the two
Constructor public class ListNode { // package access members; List can access these directly private E data; // data for this node privateListNode nextNode; /
What is constructor or ctor?
Develop a program to meet the following requirements: 1. Must use at least one function in addition to main (you can use more) 2. Must use selection 3. Must use deference/indire
Q. Explain that how do we implement two stacks in one array A[1..n] in such a way that neither the stack overflows unless the total number of elements in both stacks together is n.
Operators in C++: All C operators are valid operators in C++ also. Besides C++ has developed some new operators like Operators and their Expression: 1. Logical op
A: Use p = new T[n] and delete[] p: Fred* p = new Fred[100]; ... delete[] p; Any time you allocate an array of objects through new (generally with the [n] in the n
Aim: To implement a program to convert time in 24 hour format to 12 hour format. Code: #include #include #include class time24 {
in this problem you are given a board in which some of the elements are placed..each element represent ancolor.fill the other elements in the board such that none of the adjacent e
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