nozama and many others are using Hackety Hack to learn how to code.

Hackety Hack is a free program for Windows, Mac OS X and Linux that can teach you how to make games, applications and more and share those programs with your friends. You can ask other budding programmers questions and follow them to see what code they're working on through the Hackety Hack website.

Sign up Learn More

factorial_program by nozama

#this is a factorial program.
#note
def factorial(num)
	if num < 0
		return "You can't take the factorial of a negative number you goob!!!"
	end
	if num <= 1
		1
	else 
		num * factorial(num -1)
	end
end

alert factorial(10)
alert factorial(40)