Nach Fakultät iterativ und rekursiv...
Verfasst: Dienstag 11. November 2008, 22:26
Mit goto ^___^
(Stil absichtlich schlechter als schlecht. Kein Produktivkot, negativbeispiel ^_^)
(Wobei diese Variante strenggenommen auch iterativ ist)
Code: Alles auswählen
from goto import goto, label, comefrom
nr = 10
i = 1
end = 1
label .whl
i += 1; end *= i
if i != 10:
goto .whl
print end #Ausgabe 3268800
(Wobei diese Variante strenggenommen auch iterativ ist)