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
The Internet began when a large company wanted to sell products online
aalyn [17]
No!The internet began in the 1950s when the US government was trying to use connected computers to compete with the Soviet Union's Sputnik. Hope this helps :)
6 0
3 years ago
Which statement (s) regarding object-oriented databases is (are) CORRECT? a. Object-oriented databases can use encapsulation, wh
Allisa [31]
Hi!

I believe these all are going to be correct, but I am not 100% sure. I encourage you to see if you can actually achieve some of these tasks by creating your own database centralised around the object-oriented model. =)
4 0
3 years ago
A reflective attack can be increased in intensity by combining it with what type of attack
Svet_ta [14]
​A reflective attack can be increased in intensity by combining it with an amplification attack.
The amplification attack is a distributed denial of service (DDos) attack<span>. 
</span> A DNS look-up request is sent using the spoofed IP address of the target to vulnerable DNS servers.<span> </span>
6 0
3 years ago
Juan arrives at the clinic 40 minutes late for his follow+ up visit. With a great of gesture and mannerisms, he explains that th
kenny6666 [7]

Answer:

Juan demonstrated high-context communication style as he demonstrated the reason of being late not only by explicitly stating the reasons but also using contextual elements like gestures , body language, facial expressions etc.                          

Explanation:

  • In high-context communication a major part of a communication is read from the context.
  • This context can be an individual, his behavior and nonverbal actions, personal history, facial expressions, the communicative circumstance, body language and the communication process.
  • In high-context communication a person can be regarded as elusive, secretive, not punctual , not able to stick to plans, or inept due to a lack of ability to work on their own.
  • In this communication the circumstance, people, and non-verbal aspects are more important than the communicated words.
  • Decisions and events are based on face-to-face contact, often around a central figure of authority.
  • This communication is viewed as an art form and a way to involve others.
4 0
3 years ago
Among the many DTP software tools available today, which is regarded as the industry standard for DTP
atroni [7]

Answer:

Now these days there are many DTP software use in market such as :

MS office, Adobe in design, MS Publisher etc.

Industry standards for DTP is Desktop publishing

DTP is a desktop publishing software it is used in creation of newsletters brochures etc. It contain both textual or pictorial type of data

4 0
4 years ago
Other questions:
  • Sam wants to move from his current role in his organization to a managerial role. Which certification will help him get on a man
    6·1 answer
  • What must you do when you save a file for the first time
    7·2 answers
  • State and explain two default icons on the computer desktop​
    5·1 answer
  • How can a signature be added to an email message? Check all that apply.
    10·2 answers
  • What is the best way to protect against the loss of important files
    15·1 answer
  • a flow chart is the _______ representation of the sequence of steps required of steps required to solve a particular problem​. I
    9·1 answer
  • What is the deference between touch screen phone and keypad phone
    6·1 answer
  • What is the different between information and data
    5·1 answer
  • What is a digital dashboard, and why are they becoming an increasingly popular tool?
    15·2 answers
  • You find information that you know to be classified on the internet. What should you do.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!