3940 in words is written as :

Three Thousand Nine Hundred and Forty