Show the value of x after each of the following statements is performed:
a)
x = fabs( 7.5 )
b)
x = floor( 7.5 )
c)
x = fabs( 0.0 )
d)
x = ceil( 0.0 )
e)
x = fabs( -6.4 )
f)
x = ceil( -6.4 )
g)
x = ceil( -fabs( -8 + floor( -5.5 ) ) )
Solution:
Value of fabs( 7.5 ) is 7.5
Value of floor( 7.5 ) is 7
Value of fabs( 0.0 ) is 0
Value of ceil( 0.0 ) is 0
Value of fabs( -6.4 ) is 6.4
Value of ceil( -6.4 ) is -6
Value of ceil( -fabs( -8 + floor( -5.5 ) ) ) is -14
Post A Comment:
0 comments: