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]
2 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]2 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
After the following code runs, what will be the value of result? var x = 30; function get () { return x; } function set (value)
PilotLPTM [1.2K]

Answer:

Null

Explanation:

It entirely depends on the language you are using to implement this.

But generally by the rule of scope, "result" will return null since get() was not defined to accept any argument, and it neither know the global "x" not defined it's own x in the function.

5 0
3 years ago
How many 1000-Watt lights can be plugged into a standard 120-Volt, 15-Amp outlet? (Hint: W/V=A) *
Licemer1 [7]

Answer:

There are up to 12 lights and or plugs on that circuit. A 1000w HPS or Metal Halide light takes 9 amps at 120 volts so you can only run one on a wall outlet circuit. A standard dryer outlet is 220 volts and 30 amps so you can power up to six 1000 watt lights on that circuit.

5 0
3 years ago
Why wont my account update from Expert to Ace? I have all the points and branliests to be Ace but it wont update
grin007 [14]

Answer:

Maybe you don't have all the points and brainliests needed. Double check and if you actually don't, try to reload your device. If it still isn't working, there is something wrong with your device.

Explanation:

PLEASE MARK ME AS BRAINLIEST I REALLY WANT TO LEVEL UP

8 0
2 years ago
Read 2 more answers
¿Por qué es importante que lo países crezcan a nivel tecnológico?
IrinaK [193]

Answer:

Importancia de la tecnología en el crecimiento económico de los países. ... El desarrollo de estas vías tecnológicas aporta un aspecto positivo como el ahorro del tiempo, la disminución de los esfuerzos de los trabajadores que permite una economía progresiva.

Explanation:

4 0
3 years ago
For which of the four game elements will you give a detailed description about the challenges that the player will face, such as
vaieri [72.5K]

The four game elements that will give you  a detailed description about the challenges that the player will face is option D: objective.

<h3>What goals does game development have?</h3>

To bring about creativity and originality in task completion and issue solving. to prepare pupils for group collaboration.

Note that giving the player a clear objective gives them something to aim for. Make sure the player can relate to this motivation.

Therefore, The most crucial component of a game can be its objectives, which determine how the game is won or lost, what the player is instructed to perform in-game, and what the player must do to gain optional <em>Achievements</em>.

Learn more about objective from

brainly.com/question/18516671
#SPJ1

3 0
11 months ago
Other questions:
  • Submit your 300-word essay describing the equipment usedI in a well-equipped studio’s audio department and the training and expe
    8·2 answers
  • A function may return a pointer, but the programmer must ensure that the pointer:
    14·1 answer
  • Which of the following is an advantage of batch processing?
    8·1 answer
  • ____________ occurs when a provider does not support data export or when a provider's service is unavailable through others.
    11·1 answer
  • Which of the following instructions should be allowed only in kernel mode? (a) Disable all interrupts. (b) Read the time-of-day
    11·1 answer
  • To what would you compare the transport layer?
    12·1 answer
  • My pc suddenly freezes and i can't open any apps or task manager. Apps do not open at all and if i restart from the start it get
    9·1 answer
  • 8. The cell reference for a range of cells that starts in cell A1 and goes over to column G and down to row 10 is, a. A1-G10 b.
    7·1 answer
  • An additional factor in how an element is rendered is that properties are passed from a parent element to its children in a proc
    15·1 answer
  • Write a loop that continually asks the user what pets the user has until the user enters stop, in which case the loop ends. It s
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!