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

    Всего: 12

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

    +132

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    /// <summary>
    /// Zero matrix
    /// </summary>
    public void Zero()
    {
    	m11 = m12 = m13 = m14 =
    	m21 = m22 = m23 = m24 =
    	m31 = m32 = m33 = m34 =
    	m41 = m42 = m43 = m44 = 0;
    }

    Работа с матрицей 4 на 4

    bazhenovc, 20 Декабря 2010

    Комментарии (104)
  3. Pascal / Говнокод #4816

    +145

    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
    program bag; var numbers, weight, price : array[1..100] of byte; 
    fraction : array[1..100] of real; n, i, f, max, s, temp_i : byte; 
    temp_r : real; begin writeln('Input number of goods and maximal 
    weight: '); readln(n, max); writeln; randomize; for i := 1 to n do 
    begin numbers[i] := i; weight[i] := random(254) + 1; write(weight[i],
    ' '); price[i] := random(254) + 1; write(price[i], ' '); fraction[i]
    := price[i] / weight[i]; writeln(fraction[i]:0:2); end; f := 1; 
    while (f = 1) do begin f := 0; for i := 1 to n-1 do begin if (
    fraction[i] < fraction[i + 1]) then begin if (price[i] < price[i + 1
    ]) then begin temp_r := fraction[i + 1]; fraction[i + 1] := fraction[
    i]; fraction[i] := temp_r; temp_i := weight[i + 1]; weight[i + 1] := 
    weight[i]; weight[i] := temp_i; temp_i := numbers[i + 1]; numbers[i +
    1] := numbers[i]; numbers[i] := temp_i; f := 1; end; end; end; end; 
    s := 0; i := 1; while (s + weight[i] <= max) do begin writeln(numbers
    [i]); s := s + weight[i]; inc(i); end; readln; end.

    Geany отформатировал код :)

    bazhenovc, 02 Декабря 2010

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