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();
What is the purpose of return values? Can you not return any values from a function? If you could what would he function look like?
good night i have an assignment that i really need help with. i have to create a struct file with tag name book to have members int book_id char isbn[255]
Program is to check whether the string entered is a palindrome or not: Program is to check whether the string entered is a palindrome or not invoke function from main int p
Explain the Working of strcpy Function? strcpy() : This function is meant to use to copy one string to another. The strcpy function as well accepts two strings as arguments.
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.
Write a function for finding out highest and lowest marks obtained by a student from an array contained student name and marks. For Example : GetHighestLowestMarks{Student{n}, Ma
Pebble Merchant Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides
You are required to write a stand-alone DSP application in the C programming language. The overall objective of this application is to convert a signal from the time domain to t
Objective of this Program: (a) To learn more about modularization of a program into independent modules, (b) To use arrays in a program, (c) To get some experience with us
Write a program that allows user to enter number of elements in an array. The program then allows user to enter the elements. Write a function called max that returns the position
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