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
What is the purpose and what are some of the components of a wide area network connection?
Ilia_Sergeevich [38]

Answer:

WAN(wide area network) is the network that is used for the connection in the geographical areas on large scale.They are used for connecting the areas like cities, countries, states etc.The connection of various LANs(Local area network) and MAN(Metropolitan area network) form the WAN.

There are several components that are used in the wide area network structure. Some of the constituents are as follows:-

  • ATM()Asynchronous transfer mode
  • Fiber optic communication path
  • Modem having cables
  • Frame relay
  • Dial up internet etc.

5 0
3 years ago
Read 2 more answers
Given a effective delay of 99ms when network usage is 74%, what is the effective delay when network usage = 84% ?
NARA [144]

148.5 ms is the effective delay when network usage = 84% .

<h3>what is a computer network?</h3>
  • A group of computers sharing resources that are available on or offered by network nodes is known as a computer network.
  • Over digital links, the computers communicate with one another using standard communication protocols.
  • These connections are made up of telecommunication network technologies, which are based on physically wired, optical, and wireless radio-frequency means and may be set up in a number of different network topologies.
  • Personal computers, servers, networking equipment, and other specialized or general-purpose hosts can all function as nodes in a computer network.
  • They can have hostnames and are identifiable by network addresses.
  • After being assigned, hostnames act as recognizable labels for the nodes and are seldom updated.
  • Network addresses are used by communication protocols like the Internet Protocol to locate and identify the nodes.

To learn more about the topic, refer to the following link

brainly.com/question/8118353

#SPJ4

3 0
2 years ago
A Turing machine with doubly infinite tape (TMDIT) is similar to an ordinary Turing machine except that its tape is infinite to
umka2103 [35]

Answer and Explanation:

A TM with doubly infinite tape can simulate an ordinary TM. It marks the left-hand end of the input to detect and prevent the head from moving off of that end. To simulate the doubly infinite tape TM by an ordinary TM, we show how to simulate it with a 2-tape TM, which was already shown to be equivalent in power to an ordinary

TM. The first tape of the 2-tape TM is written with the input string, and the second tape is blank. We cut the tape of the doubly infinite tape TM into two parts, at the starting cell of the input string. The portion with the input string and all the blank spaces to its right appears on the first tape of the 2-tape TM. The portion to the left of the input string appears on the second tape, in reverse order.

3 0
3 years ago
A technician is installing RG6 cable and asks you to retrieve a connector from the parts drawer. What type of connector do you n
Bezzdna [24]

The type of connector, which is needed when a technician is installing RG6 cable and asks to retrieve a connector from the parts drawer, is F-connector.

<h3>What is F-connector?</h3>

The F-connector is a type of RF connector which is used to connect the Video equipments to the antennas and setup box.

A technician is installing RG6 cable.

  • The RG6 cable is a coax cable.
  • This cable is used in satellite signal transmission, generally for TV and setup box.

Now the technician is ask to retrieve a connector from the parts drawer. Here, we use F type connector for this RG6 cable.

Thus, the type of connector, which is needed when a technician is installing RG6 cable and asks to retrieve a connector from the parts drawer, is F-connector.

Learn more about the connector cable here

brainly.com/question/9082842

#SPJ1

4 0
2 years ago
Que ventajas podria traer el internet a la educacion artistica? Ayuda porfa telo pido porfavor
lions [1.4K]

Answer:

"Informacion"

Explanation:

La internet puede traer las mismas ventajas para la educacion artistica que cualquier otra materia y eso es "Informacion". El arte tiene muchas tecnicas. Tambien hay muchos differentes estilos de arte. La internet tiene toda la informacion sobre los artistas mas famosos de las historia, incluyendo su arte, tecnicas, estilos, temas, historias, etc. Esta informacion es sumamente importante y util por que te enseña a utilizar todos los metodos ya creados y usarlos como herramientas para crear arte que representa el artista que sos.

8 0
3 years ago
Other questions:
  • _____ refers to unsolicited commercial emails, usually sent to a large number of people with little regard to the users interest
    14·1 answer
  • Count characters Write a program whose input is a string which contains a character and a phrase, and whose output indicates the
    6·1 answer
  • Jennifer, a customer, informs you that unexpected icons are appearing on her system's desktop. You identify the symptoms of the
    12·1 answer
  • Match the file extensions to the file types. Some file types may be used more than once.
    11·1 answer
  • Processing information involves ____.a. Performing arithmetic or logical operations on binary data accepting information from th
    15·1 answer
  • Task 1 (25 points): In database [your Pitt username], create the following entity tables: movies actors locations Each tables lo
    7·1 answer
  • Write code using the range function to add up the series 99, 98, 97,...
    11·1 answer
  • Design and implement an application that reads a set of values in the range 1 to 100 from the user and then creates a chart show
    8·1 answer
  • Which type of computer is the fastest?
    7·1 answer
  • Who is the monst important person and why
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!