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

    Всего: 8

  2. C# / Говнокод #9978

    +110

    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
    this.pictureBox14.BeginInit();
          this.pictureBox15.BeginInit();
          this.pictureBox15.BeginInit();
          this.pictureBox21.BeginInit();
          this.pictureBox21.BeginInit();
          this.pictureBox22.BeginInit();
          this.pictureBox22.BeginInit();
          this.pictureBox23.BeginInit();
          this.pictureBox23.BeginInit();
          this.pictureBox24.BeginInit();
          this.pictureBox24.BeginInit();
          this.pictureBox16.BeginInit();
          this.pictureBox16.BeginInit();
          this.pictureBox17.BeginInit();
          this.pictureBox17.BeginInit();
          this.pictureBox18.BeginInit();
          this.pictureBox18.BeginInit();
          this.pictureBox19.BeginInit();
          this.pictureBox19.BeginInit();
          this.pictureBox20.BeginInit();
          this.pictureBox20.BeginInit();
          this.pictureBox9.BeginInit();
          this.pictureBox9.BeginInit();
          this.pictureBox6.BeginInit();
          this.pictureBox6.BeginInit();
          this.pictureBox5.BeginInit();
          this.pictureBox5.BeginInit();
          this.pictureBox7.BeginInit();
          this.pictureBox7.BeginInit();
          this.pictureBox10.BeginInit();
          this.pictureBox10.BeginInit();
          this.panel1.SuspendLayout();
          this.panel1.SuspendLayout();
          this.SuspendLayout();
          this.SuspendLayout();
          this.panel3.Location = new Point(140, 36);
          this.panel3.Location = new Point(140, 36);
          this.panel3.Name = "panel3";
          this.panel3.Name = "panel3";
          this.panel3.Size = new Size(740, 436);
          this.panel3.Size = new Size(740, 436);
          this.panel3.TabIndex = 4;
          this.panel3.TabIndex = 4;
          this.panel3.MouseDown += new MouseEventHandler(this.panel3_MouseDown);
          this.panel3.MouseDown += new MouseEventHandler(this.panel3_MouseDown);
          this.panel3.MouseUp += new MouseEventHandler(this.panel3_MouseUp);
          this.panel3.MouseUp += new MouseEventHandler(this.panel3_MouseUp);
          this.pictureBox2.BackColor = Color.Gray;
          this.pictureBox2.BackColor = Color.Gray;
          this.pictureBox2.Location = new Point(-11, 0);
          this.pictureBox2.Location = new Point(-11, 0);
          this.pictureBox2.Name = "pictureBox2";
          this.pictureBox2.Name = "pictureBox2";
          this.pictureBox2.Size = new Size(938, 36);
          this.pictureBox2.Size = new Size(938, 36);
          this.pictureBox2.TabIndex = 1;
          this.pictureBox2.TabIndex = 1;
          this.pictureBox2.TabStop = false;
          this.pictureBox2.TabStop = false;
          this.pictureBox3.BackColor = Color.Gray;
          this.pictureBox3.BackColor = Color.Gray;
          this.pictureBox3.Location = new Point(880, 12);
          this.pictureBox3.Location = new Point(880, 12);
          this.pictureBox3.Name = "pictureBox3";
          this.pictureBox3.Name = "pictureBox3";
          this.pictureBox3.Size = new Size(36, 466);
          this.pictureBox3.Size = new Size(36, 466);
          this.pictureBox3.TabIndex = 0;
          this.pictureBox3.TabIndex = 0;
          this.pictureBox3.TabStop = false;
          this.pictureBox3.TabStop = false;
          this.pictureBox1.BackColor = Color.Gray;
          this.pictureBox1.BackColor = Color.Gray;
          this.pictureBox1.Location = new Point(-4, 472);
          this.pictureBox1.Location = new Point(-4, 472);
          this.pictureBox1.Name = "pictureBox1";
          this.pictureBox1.Name = "pictureBox1";
          this.pictureBox1.Size = new Size(938, 36);
          this.pictureBox1.Size = new Size(938, 36);
          this.pictureBox1.TabIndex = 0;

    Полная версия: http://pastebin.com/KwDzLR4s

    P4R4, 18 Апреля 2012

    Комментарии (16)
  3. C# / Говнокод #9916

    +118

    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
    for (int Low = 0, Up = 8; (Low <= 72) & (Up <= 80); Low += 12, Up += 12)
                                    if ((i >= Low) & (i <= Up))
                                    {
                                        a = 0;
                                        for (int l = 0; l <= 13 * 3; l += 13)
                                        {
                                            if (labels[i + l].Text == "X")
                                            {
                                                a += 1;
                                                if ((l == 13 * 3) & (a != 4)) a = 0;
                                            }
                                            else a = 0;
                                        }
                                        if (a == 4)
                                        {
                                            if ((i != 8) & (i != 72))
                                            {
                                                if ((i == Low) | ((i >= 0) & (i <= 7)))
                                                    if (labels[i + 13 * 4].Text == "-")
                                                    {
                                                        labels[i + 13 * 4].Text = "O";
                                                        win = true;
                                                        goto End2;
                                                    }
                                                if ((i == Up) | ((i >= 73) & (i <= 80)))
                                                    if (labels[i - 13].Text == "-")
                                                    {
                                                        labels[i - 13].Text = "O";
                                                        win = true;
                                                        goto End2;
                                                    }
                                                if (i == Low)
                                                    if (labels[i + 13 * 4].Text == "-")
                                                    {
                                                        labels[i + 13 * 4].Text = "O";
                                                        win = true;
                                                        goto End2;
                                                    }
                                                if (i == Up)
                                                    if (labels[i - 13].Text == "-")
                                                    {
                                                        labels[i - 13].Text = "O";
                                                        win = true;
                                                        goto End2;
                                                    }
                                                if (((i >= 0) & (i <= 7)) | ((i >= 73) & (i <= 80)) | (i == Low) | (i == Up)) ;
                                                else
                                                {
                                                    if (labels[i + 13 * 4].Text == "O")
                                                        if (labels[i - 13].Text == "-")
                                                        {
                                                            labels[i - 13].Text = "O";
                                                            win = true;
                                                            goto End2;
                                                        }

    Полная версия: http://pastebin.com/gZFjYrtM

    P4R4, 10 Апреля 2012

    Комментарии (8)
  4. C# / Говнокод #9734

    +961

    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
    namespace WindowsFormsApplication3
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
            {
                switch (keyData)
                {
                    case Keys.Up:
                        if ((pictureBox1.Location.X + pictureBox1.Width >= pictureBox4.Location.X) & (pictureBox1.Location.X <= pictureBox4.Location.X + pictureBox4.Width) & (pictureBox1.Location.Y <= pictureBox4.Location.Y + pictureBox4.Height) & (pictureBox1.Location.Y >= pictureBox4.Location.Y + pictureBox4.Height / 2)) ;
                        else pictureBox1.Top -= 5;
                        if ((pictureBox2.Visible) & (pictureBox3.Visible))
                            if ((pictureBox1.Location.Y >= pictureBox2.Location.Y) & (pictureBox1.Location.Y + pictureBox1.Height <= pictureBox2.Location.Y + pictureBox2.Height) & (pictureBox1.Location.X >= pictureBox2.Location.X) & (pictureBox1.Location.X + pictureBox1.Width <= pictureBox2.Location.X + pictureBox2.Width))
                                pictureBox1.Location = new Point(pictureBox3.Location.X + (pictureBox1.Location.X - pictureBox2.Location.X), pictureBox3.Location.Y - 5);
                        if ((pictureBox2.Visible) & (pictureBox3.Visible))
                            if ((pictureBox1.Location.Y >= pictureBox3.Location.Y) & (pictureBox1.Location.Y + pictureBox1.Height <= pictureBox3.Location.Y + pictureBox3.Height) & (pictureBox1.Location.X >= pictureBox3.Location.X) & (pictureBox1.Location.X + pictureBox1.Width <= pictureBox3.Location.X + pictureBox3.Width))
                                pictureBox1.Location = new Point(pictureBox2.Location.X + (pictureBox1.Location.X - pictureBox3.Location.X), pictureBox2.Location.Y - 5);
                                break;
                    case Keys.Down:
                                if ((pictureBox1.Location.X + pictureBox1.Width >= pictureBox4.Location.X) & (pictureBox1.Location.X <= pictureBox4.Location.X + pictureBox4.Width) & (pictureBox1.Location.Y + pictureBox1.Height <= pictureBox4.Location.Y + pictureBox4.Height / 2) & (pictureBox1.Location.Y + pictureBox1.Height >= pictureBox4.Location.Y)) ;
                        else pictureBox1.Top += 5;
                        if ((pictureBox2.Visible) & (pictureBox3.Visible))
                            if ((pictureBox1.Location.Y >= pictureBox2.Location.Y) & (pictureBox1.Location.Y + pictureBox1.Height <= pictureBox2.Location.Y + pictureBox2.Height) & (pictureBox1.Location.X >= pictureBox2.Location.X) & (pictureBox1.Location.X + pictureBox1.Width <= pictureBox2.Location.X + pictureBox2.Width))
                                pictureBox1.Location = new Point(pictureBox3.Location.X + (pictureBox1.Location.X - pictureBox2.Location.X), (pictureBox3.Location.Y + pictureBox3.Height) - 5);
                        if ((pictureBox2.Visible) & (pictureBox3.Visible))
                            if ((pictureBox1.Location.Y >= pictureBox3.Location.Y) & (pictureBox1.Location.Y + pictureBox1.Height <= pictureBox3.Location.Y + pictureBox3.Height) & (pictureBox1.Location.X >= pictureBox3.Location.X) & (pictureBox1.Location.X + pictureBox1.Width <= pictureBox3.Location.X + pictureBox3.Width))
                                pictureBox1.Location = new Point(pictureBox2.Location.X + (pictureBox1.Location.X - pictureBox3.Location.X), (pictureBox2.Location.Y + pictureBox2.Height) - 5);
                                break;

    Это не поддаётся описанию. Полная версия: http://pastebin.com/97sbSVLa

    P4R4, 22 Марта 2012

    Комментарии (14)
  5. C# / Говнокод #9732

    +122

    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
    else
                    {
                        if ((textBox1.Text == textBox2.Text) | (textBox1.Text == textBox3.Text) | (textBox1.Text == textBox4.Text) | (textBox1.Text == textBox7.Text)) textBox1.ForeColor = Color.Red; else textBox1.ForeColor = Color.Black;
                        if ((textBox2.Text == textBox1.Text) | (textBox2.Text == textBox3.Text) | (textBox2.Text == textBox5.Text) | (textBox2.Text == textBox8.Text)) textBox2.ForeColor = Color.Red; else textBox2.ForeColor = Color.Black;
                        if ((textBox3.Text == textBox1.Text) | (textBox3.Text == textBox2.Text) | (textBox3.Text == textBox6.Text) | (textBox3.Text == textBox9.Text)) textBox3.ForeColor = Color.Red; else textBox3.ForeColor = Color.Black;
                        if ((textBox4.Text == textBox5.Text) | (textBox4.Text == textBox6.Text) | (textBox4.Text == textBox1.Text) | (textBox4.Text == textBox7.Text)) textBox4.ForeColor = Color.Red; else textBox4.ForeColor = Color.Black;
                        if ((textBox5.Text == textBox4.Text) | (textBox5.Text == textBox6.Text) | (textBox5.Text == textBox2.Text) | (textBox5.Text == textBox8.Text)) textBox5.ForeColor = Color.Red; else textBox5.ForeColor = Color.Black;
                        if ((textBox6.Text == textBox4.Text) | (textBox6.Text == textBox5.Text) | (textBox6.Text == textBox3.Text) | (textBox6.Text == textBox9.Text)) textBox6.ForeColor = Color.Red; else textBox6.ForeColor = Color.Black;
                        if ((textBox7.Text == textBox8.Text) | (textBox7.Text == textBox9.Text) | (textBox7.Text == textBox1.Text) | (textBox7.Text == textBox4.Text)) textBox7.ForeColor = Color.Red; else textBox7.ForeColor = Color.Black;
                        if ((textBox8.Text == textBox7.Text) | (textBox8.Text == textBox9.Text) | (textBox8.Text == textBox2.Text) | (textBox8.Text == textBox5.Text)) textBox8.ForeColor = Color.Red; else textBox8.ForeColor = Color.Black;
                        if ((textBox9.Text == textBox7.Text) | (textBox9.Text == textBox8.Text) | (textBox9.Text == textBox3.Text) | (textBox9.Text == textBox6.Text)) textBox9.ForeColor = Color.Red; else textBox9.ForeColor = Color.Black;
                        if ((textBox1.Text == textBox2.Text) | (textBox1.Text == textBox3.Text) | (textBox1.Text == textBox4.Text) | (textBox1.Text == textBox7.Text) |
                            (textBox2.Text == textBox1.Text) | (textBox2.Text == textBox3.Text) | (textBox2.Text == textBox5.Text) | (textBox2.Text == textBox8.Text) |
                            (textBox3.Text == textBox1.Text) | (textBox3.Text == textBox2.Text) | (textBox3.Text == textBox6.Text) | (textBox3.Text == textBox9.Text) |
                            (textBox4.Text == textBox5.Text) | (textBox4.Text == textBox6.Text) | (textBox4.Text == textBox1.Text) | (textBox4.Text == textBox7.Text) |
                            (textBox5.Text == textBox4.Text) | (textBox5.Text == textBox6.Text) | (textBox5.Text == textBox2.Text) | (textBox5.Text == textBox8.Text) |
                            (textBox6.Text == textBox4.Text) | (textBox6.Text == textBox5.Text) | (textBox6.Text == textBox3.Text) | (textBox6.Text == textBox9.Text) |
                            (textBox7.Text == textBox8.Text) | (textBox7.Text == textBox9.Text) | (textBox7.Text == textBox1.Text) | (textBox7.Text == textBox4.Text) |
                            (textBox8.Text == textBox7.Text) | (textBox8.Text == textBox9.Text) | (textBox8.Text == textBox2.Text) | (textBox8.Text == textBox5.Text) |
                            (textBox9.Text == textBox7.Text) | (textBox9.Text == textBox8.Text) | (textBox9.Text == textBox3.Text) | (textBox9.Text == textBox6.Text)) ;
                        else
                        {
                            label1.Visible = true;
                            label2.Visible = true;
                        }

    Удивлению нет границ! Полная версия: http://pastebin.com/S2getyHn

    P4R4, 22 Марта 2012

    Комментарии (6)
  6. C# / Говнокод #9715

    +113

    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
    if ((label1.Text == "O") & (label2.Text == "O") & (label3.Text == "O") | ((label1.Text == "X") & (label2.Text == "X") & (label3.Text == "X")))
                {
                    label1.ForeColor = Color.Red;
                    label2.ForeColor = Color.Red;
                    label3.ForeColor = Color.Red;
                    win = false;
                }
                if ((label4.Text == "O") & (label5.Text == "O") & (label6.Text == "O") | ((label4.Text == "X") & (label5.Text == "X") & (label6.Text == "X")))
                {
                    label4.ForeColor = Color.Red;
                    label5.ForeColor = Color.Red;
                    label6.ForeColor = Color.Red;
                    win = false;
                }
                if ((label7.Text == "O") & (label8.Text == "O") & (label9.Text == "O") | ((label7.Text == "X") & (label8.Text == "X") & (label9.Text == "X")))
                {
                    label4.ForeColor = Color.Red;
                    label5.ForeColor = Color.Red;
                    label6.ForeColor = Color.Red;
                    win = false;
                }
                if ((label1.Text == "O") & (label4.Text == "O") & (label7.Text == "O") | ((label1.Text == "X") & (label4.Text == "X") & (label7.Text == "X")))
                {
                    label1.ForeColor = Color.Red;
                    label4.ForeColor = Color.Red;
                    label7.ForeColor = Color.Red;
                    win = false;
                }
                if ((label2.Text == "O") & (label5.Text == "O") & (label8.Text == "O") | ((label2.Text == "X") & (label5.Text == "X") & (label8.Text == "X")))
                {
                    label2.ForeColor = Color.Red;
                    label5.ForeColor = Color.Red;
                    label8.ForeColor = Color.Red;
                    win = false;
                }
                if ((label3.Text == "O") & (label6.Text == "O") & (label9.Text == "O") | ((label3.Text == "X") & (label6.Text == "X") & (label9.Text == "X")))
                {
                    label3.ForeColor = Color.Red;
                    label6.ForeColor = Color.Red;
                    label9.ForeColor = Color.Red;
                    win = false;
                }
                if ((label1.Text == "O") & (label5.Text == "O") & (label9.Text == "O") | ((label1.Text == "X") & (label5.Text == "X") & (label9.Text == "X")))
                {
                    label1.ForeColor = Color.Red;
                    label5.ForeColor = Color.Red;
                    label9.ForeColor = Color.Red;
                    win = false;
                }
                if ((label3.Text == "O") & (label5.Text == "O") & (label7.Text == "O") | ((label3.Text == "X") & (label5.Text == "X") & (label7.Text == "X")))
                {
                    label3.ForeColor = Color.Red;
                    label5.ForeColor = Color.Red;
                    label7.ForeColor = Color.Red;
                    win = false;
                }
            }
    
            private void label7_MouseDown(object sender, MouseEventArgs e)
            {
                if (win)
                    for (int i = 0; i < 1; i++)
                    {
                        if (label7.Text == "")
                        {
                            label7.Text = "X";
    
                            if ((label1.Text == "O") & (label2.Text == "O") & (label3.Text == ""))
                            {
                                label3.Text = "O"; break;
                            }
                            if ((label1.Text == "O") & (label2.Text == "") & (label3.Text == "O"))
                            {
                                label2.Text = "O"; break;
                            }
                            if ((label1.Text == "") & (label2.Text == "O") & (label3.Text == "O"))
                            {
                                label1.Text = "O"; break;
                            }

    Крестики-нолики с одного форума. Полная версия: http://pastebin.com/59W3547n

    P4R4, 19 Марта 2012

    Комментарии (7)
  7. C# / Говнокод #9695

    +117

    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
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            int a = 0;
    
            private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
            {
                pictureBox1.BackColor = Color.Black;
            }
    
            private void pictureBox3_MouseDown(object sender, MouseEventArgs e)
            {
                pictureBox3.BackColor = Color.Black;
            }
    
            private void pictureBox7_MouseDown(object sender, MouseEventArgs e)
            {
                pictureBox7.BackColor = Color.Black;
            }
    
            private void pictureBox4_MouseDown(object sender, MouseEventArgs e)
            {
                pictureBox4.BackColor = Color.Black;
            }
    
            private void pictureBox5_MouseDown(object sender, MouseEventArgs e)
            {
                pictureBox5.BackColor = Color.Black;
            }
    
            private void pictureBox8_MouseDown(object sender, MouseEventArgs e)
            {
                pictureBox8.BackColor = Color.Black;
            }
    
            private void pictureBox6_MouseDown(object sender, MouseEventArgs e)
            {
                pictureBox6.BackColor = Color.Black;
            }
    
            private void pictureBox2_MouseDown(object sender, MouseEventArgs e)
            {
                pictureBox2.BackColor = Color.Black;
            }
    
            private void pictureBox9_MouseDown(object sender, MouseEventArgs e)
            {
                pictureBox9.BackColor = Color.Black;
            }
    
            private void pictureBox10_MouseDown(object sender, MouseEventArgs e)
            {
                a += 1;
                label1.Text = "Штрафов: " + a;
            }
    
            private void pictureBox11_MouseDown(object sender, MouseEventArgs e)
            {
                a += 1;
                label1.Text = "Штрафов: " + a;
            }
    
            private void pictureBox12_MouseDown(object sender, MouseEventArgs e)
            {
                a += 1;
                label1.Text = "Штрафов: " + a;
            }
    
            private void pictureBox13_MouseDown(object sender, MouseEventArgs e)
            {
                a += 1;
                label1.Text = "Штрафов: " + a;
            }
    
            private void pictureBox14_MouseDown(object sender, MouseEventArgs e)
            {
                a += 1;
                label1.Text = "Штрафов: " + a;
            }
    
            private void pictureBox16_MouseDown(object sender, MouseEventArgs e)
            {
                a += 1;
                label1.Text = "Штрафов: " + a;
            }
    
            private void pictureBox15_MouseDown(object sender, MouseEventArgs e)
            {
                a += 1;
                label1.Text = "Штрафов: " + a;
            }

    С одного форума

    P4R4, 16 Марта 2012

    Комментарии (5)
  8. C# / Говнокод #9659

    +964

    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
    namespace WindowsFormsApplication12
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                if (textBox1.Text == "") textBox1.Text = "1";
                if (textBox2.Text == "") textBox2.Text = "1";
                if (textBox3.Text == "") textBox3.Text = "1";
    
                label7.Text = textBox1.Text + "x2 + " + textBox2.Text + "x + " + textBox3.Text;
    
                label4.Text = "x1 = " + Convert.ToString((Convert.ToInt32("-" + textBox2.Text) + (Math.Sqrt(Math.Pow(Convert.ToInt32(textBox2.Text), 2) - 4
                        * Convert.ToInt32(textBox1.Text) * Convert.ToInt32(textBox3.Text)))) / (2 * Convert.ToInt32(textBox1.Text)));
    
                label5.Text = "x2 = " + Convert.ToString((Convert.ToInt32("-" + textBox2.Text) - (Math.Sqrt(Math.Pow(Convert.ToInt32(textBox2.Text), 2) - 4
                * Convert.ToInt32(textBox1.Text) * Convert.ToInt32(textBox3.Text)))) / (2 * Convert.ToInt32(textBox1.Text)));
    
                label6.Text = "D = " + (Math.Pow(Convert.ToInt32(textBox2.Text), 2) - 4 * Convert.ToInt32(textBox1.Text) * Convert.ToInt32(textBox3.Text)).ToString();
            }

    Программа находит корни квадратного уравнения.

    P4R4, 12 Марта 2012

    Комментарии (14)
  9. C# / Говнокод #9658

    +116

    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
    private void label1_Click(object sender, EventArgs e)
            {
                MessageBox.Show("Данная программа вычисляет\nнаибольший общий делитель.");
            }
    
            private void textBox1_TextChanged(object sender, EventArgs e)
            {
    
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                if (Convert.ToInt32(textBox1.Text) >= Convert.ToInt32(textBox2.Text))
                {
                    for (int i = Convert.ToInt32(textBox1.Text); i > 0; i--)
                    {
                        if (Convert.ToInt32(textBox1.Text) % i == 0)
                        {
                            if (Convert.ToInt32(textBox2.Text) % i == 0)
                            {
                                label2.Text = "НОД = " + Convert.ToString(i);
                                break;
                            }
                        }
                    }
                }
                else
                    for (int i = Convert.ToInt32(textBox2.Text); i > 0; i--)
                    {
                        if (Convert.ToInt32(textBox2.Text) % i == 0)
                        {
                            if (Convert.ToInt32(textBox1.Text) % i == 0)
                            {
                                label2.Text = "НОД = " + Convert.ToString(i);
                                break;
                            }
                        }
                    }
            }

    Программа с одного форума

    P4R4, 12 Марта 2012

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