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

    Всего: 1

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

    +148

    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
    void DayNumbSat (double day, int month, double year, double days) {
         
         int FirstJan, DayNumb; 
         char *Sat;
    
         FirstJan = (long) days%7 - 1;
         
         
         switch ( month ) {
              case 1: DayNumb = day;
              break;
              case 2: DayNumb = 31 + day;
              break;
              case 3: DayNumb = 31 + 28 + day;
              break;
              case 4: DayNumb = 31*2 + 28 + day;
              break;
              case 5: DayNumb = 31*2 + 28 + 30 + day;
              break;
              case 6: DayNumb = 31*3 + 28 + 30 + day;
              break;
              case 7: DayNumb = 31*3 + 28 + 30*2+day;
              break;
              case 8: DayNumb = 31*4 + 28 + 30*2 + day;
              break;
              case 9: DayNumb = 31*5 + 28 + 30*2 + day;
              break;
              case 10: DayNumb = 31*5 + 28 + 30*3 +day;
              break;
              case 11: DayNumb = 31*6 + 28 + 30*3 +day;
              break;
              case 12: DayNumb = 31*7+30*4+28+day;
              break;
         }
    
         printf("\n%d  PASSED SINCE 1ST OF JANUARY\n", DayNumb);

    govnoval, 12 Мая 2011

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