1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
postnew [5]
3 years ago
12

Write a function namedmake_complex that stores its twoarguments (both of type double) in acomplex structure, then returns thestr

ucture.
Computers and Technology
1 answer:
valentina_108 [34]3 years ago
3 0

Answer:

#include <iostream>

using namespace std;

struct complex{//structure of comlex number..

double real;

double img;

};

complex make_complex(double a,double b)//function to return complex number with two arguments of type double..

{

   complex n1;

   n1.real=a;

   n1.img=b;

   return n1;//returning complex number..

}

int main() {

   complex n;

   double a,b;

   cout<<"Enter real and Imaginary respectively"<<endl;

   cin>>a>>b;//taking input of real and imaginary parts..

   n=make_complex(a,b);//calling function..

   cout<<"Comlex number is : "<<n.real<<" + i"<<n.img;//printing the output..

return 0;

}

output:-

Enter real and Imaginary respectively

5.4 8.9

Comlex number is : 5.4 + i8.9

Explanation:

First I have created a structure for complex number.Then created a function to make complex number according to the question which returns a complex number.

You might be interested in
How can you make a search phrase more effective?
Whitepunk [10]

Let's solve this together.

To make a search term more accurate, you must keep it simple and you must be able to use more specific terms. The more specific you are with what you are asking the engine about, the more friendlier it will respond.

The answer is Option B. I hope this answer helped you!

4 0
3 years ago
Why is it more secure to require a user to press ctrl+alt+delete to log on rather than displaying the windows welcome screen?
Levart [38]
Let's say for example you have a toddler, or a pet. Let's say a cat. If the ctrl+alt+delete wasn't there. It would go straight to entering the password. Now let's say your child or pet likes to press the keys for a while. If they manage to press enter and enter the incorrect password. Eventually it will lock up your computer.
5 0
3 years ago
Fill in the blank
melamori03 [73]

Explanation:

save as because if u want to save the bame of it press save as to save it as what u want

3 0
3 years ago
Read 2 more answers
host b is sending an email intented for the user on host a to the mail server what protocol is being used to send the message
KatRina [158]

Answer:

SMTP

Explanation:

This is the SMTP or the Simple Mail Transfer Protocol. It is the push protocol and is used to send the mail message. Whereas POP3 and IMAP are meant for retrieving the message. These are the three main types of protocols associated with mail services. And the correct answer here is certainly the SMTP.

3 0
3 years ago
Which of the following is applicable during a hostile act:
Elanso [62]
Your question has been up too long, a moderator may have to delete it.
we will contact moderators to find your question and remove it, and hopefully, they will refund the points, which is not up to me.
<span>thank you for using brainly.</span>
3 0
3 years ago
Other questions:
  • Are there protections for people in terms of what data can be collected by different sites?
    10·1 answer
  • What component of effective feedback is demonstrated by giving examples of what an employee is doing right instead of just prais
    14·2 answers
  • What is the output of the following program? #include using namespace std; class TestClass { private: int val; void showVal() {
    5·1 answer
  • How are a cell's content and format related?
    12·2 answers
  • What do these terms have in common? google, yahoo!, bing they are important books. they are internet search engines. they are wo
    10·1 answer
  • In Microsoft Word, when you highlight existing text you want to replace, you're in
    7·1 answer
  • Please help ASAP!
    5·1 answer
  • What are the pros and cons of being a single decision maker
    8·1 answer
  • Anyone on ps4 willing to trade me a fennec or McClaren on rocket league?
    6·2 answers
  • Decision support systems help managers use structured data to identify problems and find solutions to business-related problems.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!