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
_____ transparency exists when the end user or programmer must specify the database fragment names but does not need to specify
madam [21]

Answer:

The correct answer to the following question will be "Local mapping".

Explanation:

  • A data independence standard in global DBMSs where questions can be constructed without understanding the local formats. Knowledge of quotas of pieces and components is however important.
  • With the transparency of local mapping, the user wants to determine both fragment location and name of data items, keeping in mind any replication that may occur.
  • This is clearly a more complicated and time-consuming question for all the users to answer than the first. A program that only offers it the amount of transparency would be unlikely to be satisfactory to later part-users.

Therefore, "Local mapping" is the right answer.

6 0
3 years ago
​to add notes or comments, insert a comment tag using the syntax _____.
Aneli [31]
The needed syntax would be:
<!--comment-->
Hope I could be of assistance! ;)
4 0
3 years ago
Read 2 more answers
How many micro processors will a small computer have? A. none B. two C. one D. three
kifflom [539]

Answer:

letter C

They only have one chip with two complete microprocessors on it, both of them share one path to memory and peripherals.

3 0
3 years ago
Read 2 more answers
Create the setStyles() function using the commands listed in the steps below. Christine wants one of five fancy style sheets to
jolli1 [7]

Answer:

Hi there! This can be implemented in a simple Python function which uses the "random" module to generate the number.

Explanation:

Using Python as the languge, we can write a the below code in a file called styles.py. The first line imports the randint function from the "random" module. The setStyles() function declares an array or 5 elements (here I have just used numbers but these could be string names of the stylesheets as well). Next, styleNum is assigned the random number and the associated stylesheet is selected from the array of stylesheets.

styles.py

from random import randint

def setStyles():

   stylesheets = [1,2,3,4,5];

   styleNum = randint(1,5);

   stylesheet = stylesheets[styleNum];

   print(stylesheet);

setStyles();

3 0
3 years ago
When correctly implemented, what is the only cryptosystem known to be unbreakable?
Leona [35]

When accurately executed, the only cryptosystem known to be unbreakable is called: "One-time Pad" (Option D)

<h3>What is a Crypto System?</h3>

The one-time pad is a cryptographic approach that cannot be broken but needs the usage of a single-use pre-shared key that is not less than the message being delivered. A plaintext is coupled with a unique secret key in this manner.

It should be emphasized that in cryptography, a cryptosystem is a collection of cryptographic algorithms that are required to perform a certain security function, such as confidentiality. A cryptosystem is often composed of three algorithms: one just for key generation, one for encrypting, and one for deciphering.

Learn more about Crypto System:
brainly.com/question/15084188
#SPJ1

Full Question:

When correctly implemented, what is the only cryptosystem known to be unbreakable?

A) Transposition cipher

B) Substitution cipher

C) Advanced Encryption Standard

D) One-time Pad

6 0
1 year ago
Other questions:
  • Terrence smiles at his customers, helps his coworkers, and stays late when needed. What personal skill does Terrence demonstrate
    10·2 answers
  • How did tafts accomplishments regarding conservation and trust-busting compare to roosevelt?
    11·1 answer
  • If a firm is set to use open-source software with which no one in the IT department is familiar, what should it do? fire the IT
    14·2 answers
  • Information from the system that is used to make modifications in the input, processing actions, or outputs is referred to as: G
    9·2 answers
  • The hardware to keep the output data when finished is a
    9·1 answer
  • Which of the following lists contains the five essential elements of a computer? Group of answer choices: 1. inputs, returns, pr
    11·1 answer
  • Select the correct answer from each drop-down menu. Look at Marta's email signature and fill in the missing elements. Marta D'Ab
    14·2 answers
  • Write a generator function named count_seq that doesn't take any parameters and generates a sequence that starts like this: 2, 1
    7·1 answer
  • A computer with the ability to store instructions and do the job when requested by the operator, this type of computer had a spe
    12·1 answer
  • Which two settings must you configure when fortigate is being deployed as a root fortigate in a security fabric topology?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!