Problem Β· Math
Calculate y/x using Patch
Given two integers y and x, compute y / x.
Assume x is non-zero and return the result formatted to exactly two decimal places.
Examples
01 Β· Example 1
y = 10 x = 2 return = "5.00"
10 / 2 = 5, formatted to two decimal places as 5.00.
Constraints
x != 0- Use two digits after the decimal point in the returned string.
More Two Sigma problems
public String calculateRatio(int y, int x) {
// write your code here
}
y10
x2
expected"5.00"
checking account