1. Список говнокодов пользователя miscff

    Всего: 1

  2. Куча / Говнокод #16581

    +131

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    module Main:
    	program factorial:
    		algorithm factorial:
    			description of the algorithm:
    				factorial of n is the algorithm that calculates the product of all the positive integers less than or equal to n.
    			end of description of the algorithm.
    			example of usage of the algorithm:
    				var1 is equal to call algorithm with parameter n which is equal to 5;
    					begin of a comment:
    						var1 is now1 120 = 5*4*3*2*1.
    						end of a comment.
    			end of example of usage of the algorithm.
    			description of author of the algorithm:
    				name: John.
    				surname: Smith.
    				date of writing of the algorithm: 2009.
    			end of description of author of the algorithm.
    			properties of the algorithm:
    				callable from other modules.
    				callable from this module.
    				can be used in expressions.
    			end of properties of the algorithm.
    			parameters of the algorithm:
    				data n: type is positive integer.
    			end of parameters of the algorithm.
    			variables of the algorithm:
    				data res: type is positive integer.
    				data now1: type is positive integer.
    			end of variables of the algorithm.
    			initialization of the variables of the algorithm:
    				res is equal to 1.
    				now1 is equal to n.
    			end of initialization of the variables of the algorithm.
    			begin of the algorithm:
    				cycle: while now1 is not 1, repeat:
    					res is equal to multiply res by now1.
    					now1 is equal to subtract 1 from now1.
    				end of cycle.
    				result of the algorithm is res
    		end of the algorithm.
    
    		algorithm main:
    			description of the algorithm:
    				main algorithm that shows the factorial of the inputted number.
    			end of description of the algorithm.
    			example of usage of the algorithm:
    			end of example of usage of the algorithm.
    			description of author of the algorithm:
    				name: John.
    				surname: Smith.
    				date of writing of the algorithm: 2009.
    			end of description of author of the algorithm.
    			properties of the algorithm:
    				callable from the system.
    			end of properties of the algorithm.
    			parameters of the algorithm:
    				data arguments: type is array of strings.
    			end of parameters of the algorithm.
    			variables of the algorithm:
    			end of variables of the algorithm.
    			initialization of the variables of the algorithm:
    			end of initialization of the variables of the algorithm.
    			begin of the algorithm:
    				call algorithm writeInteger with parameter str which is equal to
    					call algorithm factorial with parameter n which is equal to
    						call algorithm readInteger without parameters.
    				result of the algorithm is 0.
    		end of the algorithm.

    Небольшой ответ набирающему популярность WCT. Новый язык программирования LOOOONG:
    - Отступы обязательны.
    - Все блоки в функциях ("алгоритмах") обязательны.
    - блоки нужно записывать именно в таком порядке.
    - Имена параметров необходимо помнить, когда вызываешь "алгоритм".
    - Ключевых слов ОЧЕНЬ МНОГО.

    miscff, 22 Августа 2014

    Комментарии (40)