Please can anyone help me.

I have two numbers A and B
A is any number between 1 to 40
B=80
C=A*B
I want a formula that when A is greater than 40 , B will change to 100.