Compound And Exercise

 

What would the commission rate be given the following values?

 

 

intYearsEmployed

sngSales

sngPreviousSales

sngCommission

1)

3

400,000

290,000

.02 – 8,000

With the AND operator ALL of the stated conditions must be True for the entire condition to be True

Since 3 is NOT > 4 the condition is False

2)

6

100,000

400,000

.02 – 2,000

With the AND operator ALL of the stated conditions must be True for the entire condition to be True

Since 100,000 is NOT > 300,000 the condition is False

3)

4

400,000

350,000

.02 – 8,000

With the AND operator ALL of the stated conditions must be True for the entire condition to be True

Since 4 is NOT > 4 the condition is False

4)

7

100,000

250,000

.02 – 2,000

With the AND operator ALL of the stated conditions must be True for the entire condition to be True

Since 100,000 is NOT > 300,000 the condition is False

5)

5

400,000

350,000

.03 – 12,000

With the AND operator ALL of the stated conditions must be True for the entire condition to be True

Since 5 IS > 4

& 400,000 IS > 300,000

& 350,000 IS > 300,000 the condition is True

6)

3

100,000

400,000

.02 – 2,000

With the AND operator ALL of the stated conditions must be True for the entire condition to be True

Since 3 is NOT > 4 the condition is False

7)

2

100,000

250,000

.02 – 2,000

With the AND operator ALL of the stated conditions must be True for the entire condition to be True

Since 2 is NOT > 4 the condition is False

8)

5

400,000

290,000

.02 – 8,000

With the AND operator ALL of the stated conditions must be True for the entire condition to be True

Since 1290,000 is NOT > 300,000 the condition is False

 

If intYearsEmployed > 4 _

And sngSales > 300000 _

And sngPreviousSales > 300000 then

                   sngCommission = sngSales * .03

Else

          sngCommission = sngSales * .02

End If