Question: 1 . 2 7 LAB: Variables / Assignments: Using math functions Given three floating - point numbers x , y , and z , output

1.27 LAB: Variables/Assignments: Using math functions
Given three floating-point numbers x, y, and z, output xy, x(yz), the absolute value of x, and the square root of ((x * y)z).
written in coral code I have it written and the code is
// Declare variables
float x
float y
float z
float result1
float result2
float result3
float result4
// Input values
x = Get next input
y = Get next input
z = Get next input
// Perform calculations
result1= RaiseToPower(x, y)
result2= RaiseToPower(x, RaiseToPower(y, z))
result3= AbsoluteValue(x)
result4= SquareRoot(RaiseToPower((x * y), z))
// Output results with appropriate spacing to match expected format
Put result1 to output
Put "" to output
Put result2 to output
Put "" to output
Put result3 to output
Put "" to output
Put result4 to output
now after that I am supposed to get outputs of 55.90170579.324025.000006.64787 however I get outputs of 55.90169943749474579.32402221263755.06.647869871181236 close as you can see my input is 5.02.51.5 I am so lost on how to fix it.
Output all results with five digits after the decimal point, which can be achieved as follows:
Put result to output with 5 decimal places

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!