Compound Or Exercise

 

What would the commission rate be given the following values?

 

 

sngSales

intYearsEmployed

blnManagement

sngCommission

1)

100,000

7

False

3% – 3,000

With the OR operator only one of the stated conditions must be true for the entire condition to be true

Since 7 > 4 the condition is True

2)

400,000

5

True

3% – 12,000

With the OR operator only one of the stated conditions must be true for the entire condition to be true

Since 400,000 > 300,000 the condition is True

3)

300,000

3

True

3% – 9,000

With the OR operator only one of the stated conditions must be true for the entire condition to be true

Since blnManagement is TRUE the condition is True

4)

350,000

3

True

3% – 10,500

With the OR operator only one of the stated conditions must be true for the entire condition to be true

Since 350,000 > 300,000 the condition is True

5)

375,000

4

False

3% – 11,250

With the OR operator only one of the stated conditions must be true for the entire condition to be true

Since 375,000 > 300,000 the condition is True

6)

200,000

5

True

3% – 6,000

With the OR operator only one of the stated conditions must be true for the entire condition to be true

Since 5 > 4 the condition is True

7)

400,000

5

False

3% -  12,000

With the OR operator only one of the stated conditions must be true for the entire condition to be true

Since 400,000 > 300,000 the condition is True

8)

100,000

2

False

2% – 2,000

With the OR operator at least one of the stated conditions must be true for the entire condition to be true

Since 100,000 is NOT > 300,000

&   2 is NOT > 4

&   blnMangement is NOT true

the condition is False

 

 

 

 

 

 

 

If sngSales > 300000 _

Or intYearsEmployed > 4 _

Or blnManagement then

            sngCommission = sngSales * .03

Else

            sngCommission = sngSales * .02

End If