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

    Всего: 2

  2. Си / Говнокод #10163

    +129

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    inline uint32 pow(uint32 arg1, int agr2)
    {
        for (int i = 0; i < agr2; ++i)
            arg1 *= arg1;
        return arg1;
    }

    Возведение в степень.

    a553r7fa1L3d, 01 Мая 2012

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

    +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
    26. 26
    27. 27
    28. 28
    29. 29
    switch (count)
    {
    	case 2:
    		return Tuple.Create(col[1]);
    	case 3:
    		return Tuple.Create(col[1], col[2]);
    	case 4:
    		return Tuple.Create(col[1], col[2], col[3]);
    	case 5:
    		return Tuple.Create(col[1], col[2], col[3], col[4]);
    	case 6:
    		return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6]);
    	case 8:
    		return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7]);
    	case 9:
    		return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], col[7]);
    	case 10:
    		return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8]));
    	case 11:
    		return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8], col[9]));
    	case 12:
    		return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8], col[9], col[10]));
    	case 13:
    		return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8], col[9], col[10], col[11]));
    	case 14:
    		return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8], col[9], col[10], col[11], col[12]));
    	default:
    		throw new ArgumentOutOfRangeException("count", count, "Can't convert array to tuple.");
    }

    a553r7fa1L3d, 05 Апреля 2012

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