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
hãy lựa chọn một doanh nghiệp kinh doanh theo loại hình siêu thị việt nam em hãy tìm hiểu doanh nghiệp và thực hiện theo yêu cầu
Anastasy [175]

Quy trình kinh doanh, phương pháp kinh doanh hoặc chức năng kinh doanh là một tập hợp các hoạt động hoặc nhiệm vụ có liên quan, có cấu trúc bởi con người hoặc thiết bị, trong đó một trình tự cụ thể tạo ra một dịch vụ hoặc sản phẩm (phục vụ một mục tiêu kinh doanh cụ thể) cho một khách hàng cụ thể.

4 0
3 years ago
Are tigers and goldfish related
Cerrena [4.2K]
Yes, they are by law of America
7 0
3 years ago
First calculating device​
AnnyKZ [126]

Answer:

abacus is first calculating device

7 0
3 years ago
Read 2 more answers
2. Because technology is always changing, there are new applications being developed constantly. (1 point)
Zepler [3.9K]
True because we need new tech
4 0
3 years ago
Read 2 more answers
Jacek has just started a new job as a sales clerk, and his first task is to create a new sales invoice. Which Microsoft software
g100num [7]

Answer:

Microsoft Excel

Explanation:

Microsoft Excel is a Microsoft application package. It is a spreadsheet application used to analyse and manipulate data. It has columns which are referred to fields and rows also known as records.There are various features in excel that used to create statistical and graphical esctasies and data presentations.

It can be used to create template for CVs/resumes, Bank draft, receipts and invoice etc.

5 0
3 years ago
Other questions:
  • If you find yourself boxed in by a vehicle on your left or right _____________
    14·2 answers
  • / List the seven basic internal components found in a computer tower.
    5·2 answers
  • Commercial applications are never free<br><br> -True<br><br> -False
    9·1 answer
  • Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of 32-bits memory address r
    9·1 answer
  • Imagine you are building an ATM system; list at least 6 application domains for the system. That is, in which context is the sys
    13·1 answer
  • The main purpose of a service panel in a house is to
    11·1 answer
  • Raul in Colombia can enter data into a spreadsheet. Olivia in England can access the spreadsheet a few minutes later and use Rau
    7·1 answer
  • After clicking the Start button on your computer screen desktop, what option would you then select to examine system components
    15·1 answer
  • You can get context-sensitive help information from the Code Editor by_________.A) selecting Contents from the Help menu
    9·1 answer
  • Drag each tile to the correct box.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!