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
8090 [49]
3 years ago
6

Coral Given three floating-point numbers x, y, and z, output x to the power of y, x to the power of (y to the power of z), the a

bsolute value of x, and the square root of (x * y to the power of z).
Output all results with five digits after the decimal point, which can be achieved as follows:
Put result to output with 5 decimal places
Ex: If the input is:
5.0 2.5 1.5
the output is:
55.90170 579.32402 5.00000 6.64787
Hint: Coral has built-in math functions (discussed elsewhere) that may be used.
Computers and Technology
1 answer:
nordsb [41]3 years ago
3 0

Answer:

The program is as follows:

float x

float y

float z

x = Get next input

y = Get next input

z = Get next input

Put RaiseToPower(x,y) to output with 5 decimal places

Put "\n" to output

Put RaiseToPower (x,RaiseToPower (y,z)) to output with 5 decimal places

Put "\n" to output

Put AbsoluteValue(x) to output with 5 decimal places

Put "\n" to output

Put SquareRoot(RaiseToPower (x * y,z)) to output with 5 decimal places

Explanation:

This declares all variables

<em>float x </em>

<em>float y </em>

<em>float z </em>

This gets input for all variables

<em>x = Get next input </em>

<em>y = Get next input </em>

<em>z = Get next input </em>

This prints x^y

Put RaiseToPower(x,y) to output with 5 decimal places

This prints a new line

Put "\n" to output

This prints x^(y^z)

Put RaiseToPower (x,RaiseToPower (y,z)) to output with 5 decimal places

This prints a new line

Put "\n" to output

This prints |x|

Put AbsoluteValue(x) to output with 5 decimal places

This prints a new line

Put "\n" to output

This prints sqrt((x * y)^z)

Put SquareRoot(RaiseToPower (x * y,z)) to output with 5 decimal places

You might be interested in
How do I use this site?brainly.com
Zarrin [17]
You just answer other people’s questions you can also use this app to help you with your questions as well
5 0
3 years ago
In this image, we are clicking a button on the Quick Access Toolbar. What will happen
Lostsunrise [7]

Answer: It’s B The presentation will start from the beginning

Explanation: I took the test

7 0
3 years ago
How many different messages can be transmitted in n microseconds using three different signals if one signal requires 1 microsec
SIZIF [17.4K]

Answer:

a_{n} = 2/3 . 2^n + 1/3 . (-1)^n

Explanation:

Let a_{n} represents number of the message that can transmitted in <em>n </em>microsecond using three of different signals.

One signal requires one microsecond for transmittal: a_{n}-1

Another signal requires two microseconds for transmittal: a_{n}-2

The last signal requires two microseconds for transmittal: a_{n}-2

a_{n}= a_{n-1} + a_{n-2} + a_{n-2} = a_{n-1} + 2a_{n-2}, n ≥  2

In 0 microseconds. exactly 1 message can be sent: the empty message.

a_{0}= 1

In 1 microsecond. exactly 1 message can be sent (using the one signal of one  microseconds:

a_{0}= 1

2- Roots Characteristic equation

Let a_{n} = r^2, a_{n-1}=r and a_{n-2}= 1

r^2 = r+2

r^2 - r - 2 =0                 Subtract r+6 from each side

(r - 2)(n+1)=0                  Factorize

r - 2 = 0 or r +1 = 0       Zero product property

r = 2 or r = -1                 Solve each equation

Solution recurrence relation

The solution of the recurrence relation is then of the form a_{1} = a_{1 r^n 1} + a_{2 r^n 2} with r_{1} and r_{2} the roots of the characteristic equation.

a_{n} =a_{1} . 2^n + a_{2}.(-1)"

Initial conditions :

1 = a_{0} = a_{1} + a_{2}

1 = a_{1} = 2a_{1} - a_{2}

Add the previous two equations

2 = 3a_{1}

2/3 = a_{1}

Determine a_{2} from 1 = a_{1} + a_{2} and a_{1} = 2/3

a_{2} = 1 - a_{1} = 1 - 2 / 3 = 1/3

Thus, the solution of recursion relation is a_{n} = 2/3 . 2^n + 1/3 . (-1)^n

6 0
3 years ago
10. Select the correct answer.
Aleks [24]
B) licensing because they are giving Thomas permission to use the images
6 0
2 years ago
Read 2 more answers
A palindrome is a string that reads the same both forward and backward. For example, the string "madam" is a palindrome. Write a
MatroZZZ [7]

// this function will return 1 if the string sent in arguments is palindrome //else it will return 0

int palindrome(int start_of_string, int end_of_string, string &strr)

{

// base case to check if the string is not empty

if (start_of_string>= end_of_string)

   return 1;

if (strr[start_of_string] != strr[end_of_string])

    return 0;

// recursive call

return palindrome(++start_of_string, --end_of_string, strr);    

}

8 0
3 years ago
Other questions:
  • A way to minimize technical problems with your computer
    14·1 answer
  • Which of the following scanning technique attackers use to bypass firewall rules, logging mechanism, and hide themselves as usua
    11·1 answer
  • Write a program with a function that accepts a string as an argument and returns a copy of the string with the first character o
    11·1 answer
  • 11)When, if ever, will the geometric average return exceed the arithmetic average return for a given set of returns?A) When the
    6·1 answer
  • Indica si los elementos de las imagenes son una materia prima o un material elaborado
    12·1 answer
  • A keyboard would be considered _____. Select 2 options.
    13·2 answers
  • What was the name of first computer?
    14·1 answer
  • You can resize a row in a table by dragging the ____.
    13·1 answer
  • Which of the following CANNOT incorporate animation
    13·1 answer
  • eocs can be fixed locations, temporary facilities, or virtual structures with staff participating remotely.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!