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
Four example of computer software?​
rodikova [14]

<em>answer</em><em>=</em><em> </em><em>safari</em><em>,</em><em> </em><em>ms</em><em>-</em><em>word</em><em>,</em><em> </em><em>moviemaker</em><em>,</em><em> </em><em>ms</em><em>-</em><em>pain</em><em>t</em><em>,</em><em> </em><em>firefox</em><em>,</em><em>etc</em><em>.</em><em>.</em><em>.</em>

5 0
3 years ago
You have invested millions of dollars for protecting your corporate network. You have the best IDS, firewall with strict rules a
Anna35 [415]

Answer:

Social Engineering

Explanation:

Even if you invest in the best possible security infrastructure for your corporate network, you will still be vulnerable to attacks which exploit human shortcomings. An example is where an attacker manipulates a company employee to get the system access password in return for a favour. Now he can use the password to bypass all security infrastructure and gain access to critical data and code.

4 0
3 years ago
True or false? LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to se
vfiekz [6]
<h2>Answer:</h2>

The following statement is TRUE.

LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to see where you stand as compared to your classmates in terms of your mastery of grammar and vocabulary concepts.

<h2>Explanation:</h2>

LearnSmart is an adaptive technology that is helping a lot of students by letting them judge which parts/topics of the book are not clearly learnt by them and which of them are under their grip.

LearnSmart provides cards with short term questions that make i possible for students to complete their preparation in short time. In addition to this smart flash card assignments are a to compare students preparation relatively.

<h3>I hope it will help you!</h3>
4 0
3 years ago
Create and apply a CSS class named YellowBackground that selects a yellow background. Apply the class to your HTML file’s body t
masha68 [24]

Here is an HTML example with the CSS class defined inline:

<!doctype html>

<html>

 <head>

   <style>

  .YellowBackground {

 background-color : yellow;

  }

</style>

   

   </head>

 

   <body class="YellowBackground">

       <h1>A yellow background</h1>

   </body>

</html>

6 0
3 years ago
Wamna play mm2<br><br><br>imma send u my username​
SashulF [63]

Answer:

sure send it lol but how

6 0
2 years ago
Other questions:
  • If you are planning to carry a large balance on your credit card, which of the following credit card features should you look fo
    7·2 answers
  • Wich of these is an example of magnetic storage
    11·1 answer
  • Read each scenario, and then select the best wireless device for the worker’s needs. A trucker is constantly on the road. He fre
    8·2 answers
  • Why is it important to begin development of a software solution with a programming design in place? A programming design summari
    11·2 answers
  • Which type of drawer has three dispensing modes: single-dose, multi-dose, and matrix?
    13·1 answer
  • What is the output of the following program?
    11·1 answer
  • Complete the statement using the correct term.
    6·1 answer
  • Please anyone, help me.... I'm not sure how to put these all together.<br> 35 points!
    15·2 answers
  • RTOS stands for ______ Time Operating System.
    11·1 answer
  • Paul is a baker who wants to improve his recipe for muffins because they turn out with a greasy flavor. What ingredient should h
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!