1. Куча / Говнокод #23343

    +1

    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
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    (*O/*_/
    Cu  #%* )pop mark/CuG 4 def/# 2 def%%%%@@P[TX---P\P_SXPY!Ex(mx2ex("SX!Ex4P)Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*------------------------------------------------------------------*+Ex=
    CuG #%*   POLYGLOT - a program in eight languages      15 February 1991  *+Ex=
    CuG #%*   10th Anniversary Edition                      1 December 2001  *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*   Written by Kevin Bungard, Peter Lisle, and Chris Tham          *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*   Polyglot suports the following languages:                      *+Ex=
    CuG #%*     1. COBOL (ANSI)                                              *+Ex=
    CuG #%*     2. Pascal (ISO)                                              *+Ex=
    CuG #%*     3. Fortran (ANSI, f77)                                       *+Ex=
    CuG #%*     4. C (ANSI-ish)                                              *+Ex=
    CuG #%*     5. PostScript                                                *+Ex=
    CuG #%*     6. Linux/Unix shell script (bash, sh, csh)                   *+Ex=
    CuG #%*     7. x86 machine language (MS-DOS, Win32, Linux)               *+Ex=
    CuG #%*     8. Perl (version 5)                                          *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*   Usage:                                                         *+Ex=
    CuG #%*     1. Rename this file to polyglot.[cob|pas|f77|c|ps|sh|com|pl] *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*     2. Compile and run with your favorite compiler and operating *+Ex=
    CuG #%*        system.                                                   *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*   Notes:                                                         *+Ex=
    CuG #%*     1. We have attempted to use only standard language features. *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*     2. Without the -traditional flag gcc will issue a warning.   *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*     3. When transferring from Unix to DOS make sure that a LF    *+Ex=
    CuG #%*        is correctly translated into a CR/LF.                     *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*     4. Keep the black lines at the start of the program. They    *+Ex=
    CuG #%*        are important.                                            *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*     5. This text is a comment block in all eight languages.      *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*   Please mail any comments, corrections or additions to          *+Ex=
    CuG #%*   [email protected]                                       *+Ex=
    CuG #%*                                                                  *+Ex=
    CuG #%*------------------------------------------------------------------*QuZ=
    CuG #%*                                                                  *+Ex=
    CuG #%*!Mx)ExQX5ZZ5SSP5n*5X!)Ex+ExPQXH,B+ExP[-9A-9B(g?(gA'UTTER_XYZZXX!X *+
    CuG #(*                                                                  *(
    C   # */);                                                              /*(
    C   # *)  program        polyglot (output);                             (*+
    C   #     identification division.
    C   #     program-id.    polyglot.
    C   #
    C   #     data           division.
    C   #     procedure      division.
    C   #
    C   # * ))cleartomark   /Bookman-Demi findfont 36 scalefont setfont     (
    C   # *                                                                 (
    C   #
    C   # *                  hello polyglots$
    C   #     main.
    C   #         perform
    C  /# * ) 2>_$$; echo   "hello polyglots"; rm _$$; exit;
    C   # * (
    C   #
    C     *0 ) unless print "hello polyglots\n"; __END__
                  print
    C             stop run.
         -*,                'hello polyglots'
    C
    C         print.
    C             display   "hello polyglots".                              (
    C     */  int i;                                                        /*
    C     */  main () {                                                     /*
    C     */      i=printf ("hello polyglots\n"); O= &i; return *O;         /*
    C     *)                                                                (*
    C     *)  begin                                                         (*
    C     *)      writeln  ('hello polyglots');                             (*
    C     *)                                                                (* )
    C     * ) pop 60 360                                                    (
    C     * ) pop moveto    (hello polyglots) show                          (
    C     * ) pop showpage                                                  ((
    C     *)
               end                                                          .(* )
    C)pop%     program       polyglot.                                      *){*/}

    C: https://ideone.com/LzLeJH
    Pascal (gpc): https://ideone.com/J7VAQk
    Perl: https://ideone.com/AmODLG

    К сожалению, не все языки удалось проверить имеющимися интерпретаторами/компиляторами.

    Запостил: inkanus-gray, 12 Сентября 2017

    Комментарии (1) RSS

    Добавить комментарий