How to implement affine cipher?

affine cipher in cryptology
multiplicative cipher