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
LuckyWell [14K]
3 years ago
15

Define a function called hasRealSolution that takes three parameters containing integer values: a, b, and c. If "b squared" minu

s 4ac is negative, the function returns False otherwise, it returns True.
Computers and Technology
1 answer:
sukhopar [10]3 years ago
6 0

Answer:

Following are the function in C++ Programming language

bool hasRealSolution(int a,int b,int c) // function definition

{

if ((b*b)-(4*a*c)<0) // check condition

return false;

else

return true;

}

Explanation:

Following are the program of this question

#include <iostream>  // header file

using namespace std; // namespace

bool hasRealSolution(int a,int b,int c); // prototype

bool hasRealSolution(int a,int b,int c) // function definition

{

if ((b*b)-(4*a*c)<0)  // check condition

return false;

else

return true;

}

int main() // main function

{

   bool x=hasRealSolution(1,2,4); // calling

  cout<<x; // display the return value

  return 0;

}

Output:

0

Following are the description of code:

  • We declared a function i.e "hasRealSolution " of "bool" type.In this function there are three parameter is pass "a","b" and "c" of "int "type.
  • In the if block we check the condition i.e if "b squared" minus 4ac is negative then it returns the false bool value otherwise it returns the true bool value.
  • In the main function we call the function "hasRealSolution " by passing three integer values into that function and store their value in variable "x" of the bool type.
  • Finally  we print the value x in the main function.

You might be interested in
8.3 code practice edhesive PLEASE HELP AND HURRY
NemiM [27]

Answer:

numbers = '14 36 31 -2 11 -6'

nums = numbers.split(' ')

for i in range(0, len(nums)):

  nums[i] = int(nums[i])

print(nums)

8 0
2 years ago
WHAT DOES THE TRANSPORT LAYER USE TO MAKE SURE THAT A MESSAGE IS REASSWMBLED CORRECTLY ON THE RECEIVING DEVICES?
mrs_skeptik [129]
The answer is  sequence  number
6 0
3 years ago
How can i repair computer processor?
Lisa [10]
Short answer, you don't. Modern Processors are made up of billions of transistors and are built in multi million dollar factories that have equipment just for that purpose.
8 0
3 years ago
The __________ endian storage format places the __________ byte of a word in the lowest memory address. The __________ endian st
mr Goodwill [35]

Answer:

i. Big

ii. most significant

iii. little

iv. most significant

Explanation:

8 0
2 years ago
In attempts to improve their contribution to the environment, a company decided to adapt to green computing. Which of these tech
timama [110]

Answer:

All of them apply

Explanation:

Green computing is the process of using environmental friendly computers and its associated components, accessories and other supporting devices.

Virtualization helps us to reduce the number of hardware that we are using.

Grid computers helps us to reduce the use of number of machines and thus supporting the environment in a right way.

Recycling process. Any material that we use needs to be recycled effectively and also in an environmental friendly way.

Autonomic computing uses eco-friendly system which in turn hugely support green computing.

8 0
3 years ago
Other questions:
  • You have to communicate a signal in a language that has 3 symbols A, B and C. The probability of observing A is 50% while that o
    11·1 answer
  • Write an application named EnterUppercaseLetters that asks the user to type an uppercase letter from the keyboard. If the charac
    5·1 answer
  • Which of the following definition below describes a wall opening?
    6·2 answers
  • Which of these is NOT a desktop computer operating system?
    8·2 answers
  • I am doing 7th grade coding 3.02 assignment can anybody help me it says bad input on line 3 and this is what it is can someone h
    6·1 answer
  • Which format of image files can be inserted in html?​
    8·2 answers
  • What is output?
    13·1 answer
  • Which of the following statements is TRUE of a peer-to-peer network?
    10·1 answer
  • Write a function, called valFrequency, that given a list of values as a parameter, counts the frequencies for each value in the
    14·1 answer
  • Which of the following terms refers to the cells that contain values and labels to be graphed in the chart?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!