implemented factorial functioin and tested mod()
execute after compilation