Using the functions in the attached images write the following as a c++ expression. A. 9.2 to the power of 4.0 B. Square root of 5x-3xy C. Cube root of a+b D. -b + square root b^2 - 4ac all over 2a E. The absolute value of 3x^2 - 2y

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
Using the functions in the attached images write the following as a c++ expression. A. 9.2 to the power of 4.0 B. Square root of 5x-3xy C. Cube root of a+b D. -b + square root b^2 - 4ac all over 2a E. The absolute value of 3x^2 - 2y
## Predefined Functions in C++

This table provides an overview of some predefined functions in C++ along with their purposes, required header files, parameter types, and results.

| Function      | Header File | Purpose                                                                                  | Parameter(s) Type | Result Type |
|---------------|-------------|------------------------------------------------------------------------------------------|-------------------|-------------|
| `fabs(x)`     | `<cmath>`   | Returns the absolute value of its argument. Example: `fabs(-5.67) = 5.67`                | `double`          | `double`    |
| `floor(x)`    | `<cmath>`   | Returns the largest whole number that is not greater than `x`. Example: `floor(45.67) = 45.00` | `double`          | `double`    |
| `islower(x)`  | `<cctype>`  | Returns `true` if `x` is a lowercase letter; otherwise, it returns `false`. Example: `islower('h')` is `true` | `int`             | `int`       |
| `isupper(x)`  | `<cctype>`  | Returns `true` if `x` is an uppercase letter; otherwise, it returns `false`. Example: `isupper('K')` is `true` | `int`             | `int`       |
| `pow(x, y)`   | `<cmath>`   | Returns `x` raised to the power `y`. If `x` is negative, `y` must be a whole number. Example: `pow(0.16, 0.5) = 0.4` | `double`          | `double`    |
| `sqrt(x)`     | `<cmath>`   | Returns the nonnegative square root of `x`, which must be nonnegative. Example: `sqrt(4.0) = 2.0` | `double`          | `double`    |
| `tolower(x)`  | `<cctype>`  | Returns the lowercase value of `x` if `x` is uppercase; otherwise, returns `x`.          | `int`             | `int`       |
| `toupper(x)`  | `<cctype>`  | Returns the uppercase value of `x` if `x` is lowercase; otherwise, returns `x`.          | `int`             | `int`       |

This table
Transcribed Image Text:## Predefined Functions in C++ This table provides an overview of some predefined functions in C++ along with their purposes, required header files, parameter types, and results. | Function | Header File | Purpose | Parameter(s) Type | Result Type | |---------------|-------------|------------------------------------------------------------------------------------------|-------------------|-------------| | `fabs(x)` | `<cmath>` | Returns the absolute value of its argument. Example: `fabs(-5.67) = 5.67` | `double` | `double` | | `floor(x)` | `<cmath>` | Returns the largest whole number that is not greater than `x`. Example: `floor(45.67) = 45.00` | `double` | `double` | | `islower(x)` | `<cctype>` | Returns `true` if `x` is a lowercase letter; otherwise, it returns `false`. Example: `islower('h')` is `true` | `int` | `int` | | `isupper(x)` | `<cctype>` | Returns `true` if `x` is an uppercase letter; otherwise, it returns `false`. Example: `isupper('K')` is `true` | `int` | `int` | | `pow(x, y)` | `<cmath>` | Returns `x` raised to the power `y`. If `x` is negative, `y` must be a whole number. Example: `pow(0.16, 0.5) = 0.4` | `double` | `double` | | `sqrt(x)` | `<cmath>` | Returns the nonnegative square root of `x`, which must be nonnegative. Example: `sqrt(4.0) = 2.0` | `double` | `double` | | `tolower(x)` | `<cctype>` | Returns the lowercase value of `x` if `x` is uppercase; otherwise, returns `x`. | `int` | `int` | | `toupper(x)` | `<cctype>` | Returns the uppercase value of `x` if `x` is lowercase; otherwise, returns `x`. | `int` | `int` | This table
### Predefined Functions

The following table lists some common predefined mathematical functions in C++ along with their purposes, parameter types, and results.

| Function | Header File | Purpose | Parameter(s) Type | Result Type |
|----------|-------------|---------|-------------------|-------------|
| abs(x)   | `<cmath>`   | Returns the absolute value of its argument: `abs(-7) = 7` | int (double) | int (double) |
| ceil(x)  | `<cmath>`   | Returns the smallest whole number that is not less than x: `ceil(56.34) = 57.0` | double | double |
| cos(x)   | `<cmath>`   | Returns the cosine of angle x: `cos(0.0) = 1.0` | double (radians) | double |
| exp(x)   | `<cmath>`   | Returns e^x, where e = 2.718: `exp(1.0) = 2.71828` | double | double |

These functions are part of the `<cmath>` library, which must be included to utilize these mathematical operations. Each function operates on numerical parameters and returns a result of the same or compatible data type.
Transcribed Image Text:### Predefined Functions The following table lists some common predefined mathematical functions in C++ along with their purposes, parameter types, and results. | Function | Header File | Purpose | Parameter(s) Type | Result Type | |----------|-------------|---------|-------------------|-------------| | abs(x) | `<cmath>` | Returns the absolute value of its argument: `abs(-7) = 7` | int (double) | int (double) | | ceil(x) | `<cmath>` | Returns the smallest whole number that is not less than x: `ceil(56.34) = 57.0` | double | double | | cos(x) | `<cmath>` | Returns the cosine of angle x: `cos(0.0) = 1.0` | double (radians) | double | | exp(x) | `<cmath>` | Returns e^x, where e = 2.718: `exp(1.0) = 2.71828` | double | double | These functions are part of the `<cmath>` library, which must be included to utilize these mathematical operations. Each function operates on numerical parameters and returns a result of the same or compatible data type.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education