We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 2: Operators
Day 2: Operators
Sort by
recency
|
3403 Discussions
|
Please Login in order to post a comment
Write your code here
i am using def function but this is not exixt
function solve(meal_cost, tip_percent, tax_percent) { // Write your code here const tip = (tip_percent/100) * meal_cost; const tax = (tax_percent/100) * meal_cost; const total_cost = meal_cost + tip + tax; console.log(Math.floor(total_cost)); }
why my code doesn't work for the last test case that it works fine for the rest three test cases.print(round((meal_cost + (meal_cost * tip_percent / 100) + (meal_cost * tax_percent / 100))))
import java.io.; import java.math.; import java.security.; import java.text.; import java.util.; import java.util.concurrent.; import java.util.function.; import java.util.regex.; import java.util.stream.*; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList;
class Result {
}
public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
}