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
Gemiola [76]
3 years ago
12

Write the definition of a function named quadratic that receives three double parameters a, b, c. If the value of a is 0 then th

e function prints the message "no solution for a=0" and returns. If the value of "b squared" – 4ac is negative, then the code prints out the message "no real solutions" and returns. Otherwise the function prints out the largest solution to the quadratic equation. The formula for the solutions to this equation can be found here: Quadratic Equation on Wikipedia.
Computers and Technology
1 answer:
podryga [215]3 years ago
6 0

Answer:

Following are the program in the C++ Programming Language.

#include <iostream> //header file

#include <cmath> //header file

using namespace std; //namespace

//define function

void quadratic (double a, double b, double c)

{

 double x,y; //set double type variables

 //check a==0

 if (a==0)

 { //then print message

   cout << "no solution for a=0";

 }

 //check if solution is less than 0

 else if ((b*b - 4*a*c) < 0)

 { //print message

   cout << "no real solutions";

 }

 //otherwise

 else

 {//solve the following quadratic equation

   x = (-b + sqrt( b*b - 4*a*c)) /(2*a);//in term of x

   y = (-b - sqrt(b*b - 4*a*c)) / (2*a);//in term of y

   //check x is greater than y

   if (x > y){

     cout<<x; //print the value of x

   }

   //otherwise

   else{

     cout<<y;//print the value of y

   }

 }

}

//define main method

int main() {

 //set double type variables and assign their value

 double x=10, y=50, z=-205;

 //call the function

 quadratic(x,y,z);

}

<u>Output</u>:

2.67204

Explanation:

Here, we define a function "quadratic" and pass three double data type variables i.e., "a", "b" and, "c" inside the function.

  • Set two double type variable i.e., "x", "y".
  • Set the if conditional statement and check the conditions is the variable a is equal to the 0 then, print the message or check another condition is the solution of the equation "b*b - 4*a*c" is less than 0, then print the message.
  • Otherwise, solve the quadratic equation in terms of the variable x or the variable y.
  • Again check the condition inside the else part is the variable x is greater than the variable y then, print the value of x otherwise print the value of y.

Finally, we define the main function inside it we set three double type variables i.e., "x", "y" and, "z" and initialize value 10, 50 and, -250 then, call the function and pass the variables x y z in its parameter.

You might be interested in
________ computers are specially designed computer chips that reside inside other devices, such as a car. Select one: A. Tablet
BartSMP [9]

Answer:

The correct answer to the following question will be Option C (Embedded).

Explanation:

  • An embedded system seems to be a monitoring system that incorporates a computer processor, device storage, and peripheral output/input devices that have a particular function within such a larger electrical or mechanical network.
  • Such devices are chips that are designed specifically and live within other devices or appliances.

The other three solutions can not perform tasks like the embedded computers do or even any other computer can implement the computer's processor. Therefore, it's the right answer.

3 0
3 years ago
Read 2 more answers
True or false
wariber [46]

Answer:

It would definitely be true studied a lot of this stuff.

Explanation:

8 0
2 years ago
Your uncle spent most of his teen years in a hospital undergoing treatment for a severe physical illness. As an adult, he is rat
ziro4ka [17]

Answer:

one-dimensional

Explanation:

According to my research on studies conducted by psychologists, I can say that based on the information provided within the question I can say that the theory or model of what caused his phobia is one-dimensional. This can be said because by growing up in a single closed environment he does not have experience when finally being part of society, therefore his personality or characteristics are one-dimensional.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Propose a data structure that supports the stack push and pop operations and a third operation findMin, which returns the smalle
juin [17]

Answer: attached below

Explanation:

3 0
2 years ago
What technology is being used when you are sent an email saying you can track your package?
LuckyWell [14K]

The technology is being used when you are sent an email saying you can track your package is known to be a scan code.

<h3>What are code-scanning technology?</h3>

This is known to be called a barcode reader or simply say a barcode scanner.

It is seen as a kind of an optical scanner that tends to read printed barcodes, as well as be able to decode the data that are found in the barcode and transmit the data to a computer.

Hence, The technology is being used when you are sent an email saying you can track your package is known to be a scan code.

Learn more about scan code from

brainly.com/question/24937533

#SPJ1

4 0
1 year ago
Other questions:
  • When you include a word cover page in a multi page document, the cover page is not considered the first page. True or false?
    13·1 answer
  • Web sites use _____ to track users while they are on the site.
    14·1 answer
  • The process of saving files to disk is called.<br> A.read<br> B. Write<br> C. Lock<br> D. Protect
    6·1 answer
  • What cell phone technology is the most popular in the united states?
    8·2 answers
  • What is the impact of information technology in your daily life?
    12·1 answer
  • Random Access Memory is tempory computer memory that stores works in progress
    7·1 answer
  • ___________ is related to mass, but also includes the gravitational pull of the Earth.
    14·1 answer
  • What is the function of a breadcrumb trail in a website?
    13·1 answer
  • Tick the best alternatives 1. Which one of the following is input device? a) Speaker b) Printer c. Monitor d. Mouse​
    8·2 answers
  • What is the basic body structure of html.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!