Home leetcode Leetcode 2303 Calculate Amount Paid in Taxes Solution in c++ | Hindi Coding Community Leetcode 2303 Calculate Amount Paid in Taxes Solution in c++ | Hindi Coding Community Author - Akash November 11, 2022 0 double calculateTax(vector<vector<int>>& b, int income) { double res = 0, prev = 0; for (int i = 0; i < b.size(); prev = b[i++][0]) res += max(0.0, (-prev + min(income, b[i][0])) * b[i][1] / 100); return res;} Tags 2303Calculate Amount Paid in Taxescoding with akashcompetetivecodingCPPdsahcchindi coding communityhindicodingcommunityleetcode Facebook Twitter Whatsapp Newer Older