code for 10 consecutive factorial - written in 4 mins