Answers for "floor"

29

math.floor js

console.log(Math.floor(5.95));
// expected output: 5

console.log(Math.floor(5.05));
// expected output: 5

console.log(Math.floor(5));
// expected output: 5

console.log(Math.floor(-5.05));
// expected output: -6
Posted by: Guest on April-06-2020
2

javascript floor

Math.floor(1.6);

result: 1
Posted by: Guest on November-12-2020
1

floor

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int x = 15;
    double result;
    result = floor(x);
    cout << "Floor of " << x << " = " << result << endl;

    return 0;
}
Posted by: Guest on June-05-2021
0

floor

function myArrayMax(arr) {

    return Math.max.apply(null, arr);
}
Posted by: Guest on September-24-2021

Browse Popular Code Answers by Language