我想看到你可以想出的所有不同的方法,一个阶乘子例程或程序。 希望任何人都可以来这里,看看他们是否想要学习一种新的语言。
思路:
程序 实用 面向对象 一个衬垫 混淆 古怪 坏代码 多语种基本上我想看一个例子,写一个算法的不同方法,以及它们在不同语言中的外观。
请将其限制为每个条目的一个示例。 我会允许你每个答案有不止一个例子,如果你想突出一个特定的风格,语言,或只是一个思想深思熟虑在一个职位。
唯一真正的要求是必须找到给定参数的阶乘,以所有语言代表。
创意!
推荐指南:
# Language Name: Optional Style type - Optional bullet points Code Goes Here Other informational text goes hereIdeas:
Procedural Functional Object Oriented One liners Obfuscated Oddball Bad Code PolyglotBasically I want to see an example, of different ways of writing an algorithm, and what they would look like in different languages.
Please limit it to one example per entry. I will allow you to have more than one example per answer, if you are trying to highlight a specific style, language, or just a well thought out idea that lends itself to being in one post.
The only real requirement is it must find the factorial of a given argument, in all languages represented.
Be Creative!
Recommended Guideline:
# Language Name: Optional Style type - Optional bullet points Code Goes Here Other informational text goes hereI will ocasionally go along and edit any answer that does not have decent formatting.
更多推荐
发布评论