#Web designer
def factorial(x):
#-------------------------------------------------
#--- Code snippet from The Math Vault ---
#--- Calculate factorial (C) Arthur Smith 1999 ---
#-------------------------------------------------
result = str(1)
i = 1 #Thanks Adam
while i <= x:
#result = result * i #It's faster to use *=
#result = str(result * result + i)
#result = int(result *= i) #??????
result str(int(result) * i)
#result = int(str(result) * i)
i = i + 1
return result
print factorial(6)
class StandardMathematicsSystem(MathematicsSystem):
def __init__(self, ibase):
if ibase.getBase() != new (IntegralNumber, 2):
raise NotImplementedError
self.base = ibase.getBase()
def calculateFactorial(self, target):
result = new (IntegralNumber, 1)
i = new (IntegralNumber, 2)
while i <= target:
result = result * i
i = i + new (IntegralNumber, 1)
return result
print StandardMathematicsSystem.getInstance(new (InternalBase, new (IntegralNumber, 2))).calculateFactorial(new (IntegralNumber, 6))
Name:
Anonymous2010-12-08 15:34
I AM THE MOST FUCKING NGGER MATURE
GIVE ME BACK THE PASSWORD
Name:
Anonymous2010-12-08 15:47
These need to be done: C, C++, C# (and with XNA), Java, HTML, JavaScript, CSS, XML, SQL, LISP
Altough a "default" portuguese language set of rules has been recently approved by all portuguese-speaking countries, there are still differences. That was just to clarify, I'm not compulsive. I've been around for quite a time and never said it, right?
>>312 Altough a "default" portuguese language set of rules has been recently approved by all portuguese-speaking countries, there are still differences.
Do those differences apply to the word ``resultado''? I've been around for quite a time and never said it, right?
Somehow your posting of a uninteresting factorial implementation written in C# on this particular thread makes me doubt that.
class Brazilian
@@hello_good_sir = 'AEHAUEHAUHEUAHEUAEHUAEHUAEHEUHEUAHEUHEU'
@@are_you_from_the_southern_lands = 'BR?'
while true do
puts @@hello_good_sir
3.times { puts @@are_you_from_the_southern_lands }
end
end
>>312
I would hardly call the latest spelling reform as a new ``default set of rules'' across multiple countries. There's still a long way to go until that happens.
Yes. But just for something so crappy to be commonly accepted was already a huge step backwards. They just made things written wrong work somewhat right.