Description
Solutions
Adding Two Numbers
🔥 FULLTIME📚RELATED PROBLEMS
Determine the integer floor of the sum of two floating point numbers. The floor is the truncated float value, i.e., anything after the decimal point is dropped.
Function Description
Complete the function addNumbers
in the editor below.
addNumbers
has the following parameter(s):
float a
: a floating point numberfloat b
: a floating point number
Returns
int: the floor of the sum of two floating point numbers
Example 1:
Input: a = 1.1, b = 3.89
Output: 4
Explanation:floor(1.1 + 3.89) = floor(4.99) = 4.
Constraints:
- 0.1 < a, b < 10^6
- a and b have at most 8 places after the decimal

Related Problems
Testcase
Result
Case 1
input:
output: