Convert the following mathematics expressions to C++ expressions. Use the declarations provided. Indicate the appropriate header file for any library function used. Be sure you initialize any variables whose values you are using to reasonable values for the library functions you are using.

```
int x, y; //declaration for a) and b)
a) y = x 3
b) y <= |x|
double x, y, z, area; //declaration for c) through e).
c) z = x 1.6
d) z = area area
e) p =xy xy

```


a) //no include file necessary for this expression
int y, x = 39; // any value for x
y = x ??x ??x;
//alternate solution using pow function.
#include
using namespace std;
y = pow(x, 3);
b) #include
using namespace std;

int y; int x = -23; // any value for x
y = abs(x);
// or
#include
double y, x = -79.8; // any value for y
y = fabs(x);
c) #include
using namespace std;
double z, x = 2.6;
z = pow(x, 1.6);
d) #include
using namespace std;
double z, area = 144; // here area must not be
// negative
z = area ??sqrt(area);
// the pow function can be used for this:
z = pow (area, 1.5);
e) // no includes are necessary here
double p, x = 3, y = -4;
//any values for x, y except x = y
p = (x * x + y) / (x * x - y);
//specifications can be interpreted to allow
//int variables as well```

```

Computer Science & Information Technology

You might also like to view...

For an XHTML document to be well formed, the element must include both the src and ____ attributes.

A. size B. width C. text D. alt

Computer Science & Information Technology

If a failed BIOS/UEFI flash occurs, some motherboard manufacturers have incorporated secondary BIOS/UEFI in case of failure

Indicate whether the statement is true or false

Computer Science & Information Technology

To check a group of fields and trigger an error message if any of them is empty, you use a(n) ____ statement.?

A. ?debugger B. ?loop C. ?console.log() D. ?submit

Computer Science & Information Technology

Which item in the figure above is used to create a circle selection by holding [Shift] while dragging?

A. 3 B. 4 C. 6 D. 9

Computer Science & Information Technology