ballislifeqw6483 ballislifeqw6483
  • 07-08-2019
  • Computers and Technology
contestada

Determine the exact output of the code:

$num = 3.14;

echo floor($num);

Select one:

a. 3.75

b. 3.5

c. 4

d. 3

Respuesta :

PhantomWisdom PhantomWisdom
  • 12-08-2019

Answer:

3

Explanation:

The function floor() is used to give the integer which is smaller than or equal to the provided decimal value.

for example:

let a=5.8

floor(a);

the function provides the value 5 (smaller than or equal to 5.8).

In the given code:

variable num assigns the number 3.14.

then, floor(3.14) gives the value 3 (smaller than or equal to 3.14).

then, the echo print the value on the screen.

Therefore, the correct answer is 3.

Answer Link

Otras preguntas

Good thesis statement for essay about "Lies "
95 divided by 4 and 34 divided by 2
A skateboarder has an acceleration of -1.9 m/s2. If her initial speed is 6 m/s how long does it take her to stop? A. 4.1s B. 3.2s C. 0.32s D. 2.1s
what are five observable properties of matter?
Human evolution - comparing primates
A single-cell amoeba doubles every 3 days. how long would it take on amoeba to produce a population of about 10,000 amoebae?
what is 7/10-14/100 in simplest form
The school is able to buy dozen roses for $9.36.The roses will be sold with a 150% markup. For what price the school sell 1 dozen roses
The average (arithmetic mean) of 0, a, and b is 2a. What is the value of b in terms of a?
Which was NOT a consequence of the Protestant reformation A:belief in purgatory B:wars of religion C:new Christian denomination D:the rise of nation-states