Fluorite | Level 6

## Computing tax rate

I am not sure how to do this question of computing tax rate. this is my code so far:

```data restTax;
input restaurant \$ sales1-sales12 ;
cards;
Bollos 3281 3413 3114 2500 1700 2500 3114 3319 3514 1282 2434 2818
PKs 4042 3084 3108 3150 3800 3100 1531 2914 3819 4124 4274 4471
Greens 6015 6123 6113 6100 6100 6200 6186 6132 3123 4231 6039 6215
;
Run;
data tax;
set restTax;

array sales (*) sales1-sales12;
array tax (*) tax1-tax12;
do i=1 to sales[i];```

3 REPLIES 3
Super User

## Re: Computing tax rate

The exercise is asking you to calculate the tax amount, not the rate. The rate is provided to you: 0.075 which would typically be stated as 7.5 percent if this is a sales tax.

How do you figure a tax amount when given the tax rate? I multiply an amount by 0.075 to get the tax amount or 1.075 to get the price with tax, depends on the question.

Does that give you enough to get started?

Fluorite | Level 6

## Re: Computing tax rate

no. I am still pretty confused.
Super User

## Re: Computing tax rate

tax = sales* taxrate;

or

tax = sales * 0.075;

with arrays then the each tax and each price is referenced as tax[i] and sales[i].

Discussion stats
• 3 replies
• 916 views
• 0 likes
• 2 in conversation