How to attempt?
Question
Write a program to calculate the total bill tax amount for a list of billing amounts passed as
an array of long integers
Up to the amount 1000, there is no tax applicable, subsequently, a fal tax of 10% 18
applicable for the remaining amount as per the tax rate,
Note:
1. All calculations and results should be integer based ignoring fractions
2. You are expected to write code in the cale Total Tax function only which will receive
the first parameter as the number of items in the array and second parameter as the
array itself. You are not required to take input from the console
TA
19
Example
Calculating total tax for a list of 5 billing amount
Input
input1: 5
input2: 1000 2000 3000 4000 5000
Output
1000
Explanation
The first parameter (5) is the size of the array. Next is an array of billing amounts. For
the first amount, there will be o tax and for the next amount, it will be 10% of (2000
1000)=100 and so on. The sum of all the tax amounts will be (0+100+200*300*400=1000)
Answers
Answered by
1
Answer:
array of positive integers. note : you are expected to write code in the findtotaldistance function only which receive the first parameter as the numbers of items in the array and second paramter as the array itself. you are not required to take the input from the console.
Similar questions