Computer Science, asked by anchurirakshitha, 4 months ago

write a program to calculate the total bill tax amount for a list of billing amounts passed as an array of long integers upto the amount 1000 there is no tax applicable subsequently a flat tax of 10% applicable for remaining amount as per the tax rate​

Answers

Answered by maryamzafar915
39

Answer:

calculate total tax for a list of 5 billions amount

input 5

input 2 1000,2000,3000,4000

output

1000

#include<studio.h>

#include<string.h>

int calctotal Tax(int input1, input 2)

{

int i=0, sum=0, total_bill=0, taxable _amount=0;

for(I=0; I<input1; I++){

sum= sum+input2[I];

}

if( sum>=1000){

taxable_amount = ( sum-1000)/10;

}

total_ bill= sum+ taxable_amount;

return total_ bill;

}

Answered by mahimasingh22288
61

int calcTotalTax(int input1, int input2[])

{

int totaltax=0;

for(int i=0;i<input1;i++)

{

input2[i] = (input2[i] - 1000) / 10;

totaltax = totaltax + input2[i];

}

return totaltax;

}

Similar questions