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

    Всего: 5

  2. C++ / Говнокод #8422

    +995

    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
    #include <stdio.h>
    #include <conio.h>
    #include <condefs.h>
     
    int main() {
    char str[]="любой текст";
    int i=0;
    while (str[i]!='\0') {
    printf("%c", str[i++]^100);
    if (str[i]=='\0') break;
    printf("%c", str[i++]|10);
    if (str[i]=='\0') break;
    printf("%c", str[i++]&400);
    if (str[i]=='\0') break;
    }
    printf("\n");
    getch();
    return 0;
    }

    Шифруется текст

    ITdocer, 03 Ноября 2011

    Комментарии (25)
  3. PHP / Говнокод #8283

    +158

    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
    <script src=scripts.js></script>
    <?
    
        if (isset($remove) && $user1 !="selectuser"):  //to remove user from DB
    	print "Was updated sucsessfully: user '$user1' was removed<br>";
    	print "<font color=red>If You want to reload this page use <u>our 'Reload' button only</u></font>";
    	$query="delete from users where login=\"$user1\"";
            $result=mysql_query($query);     
    
       if (!isset($reloadme) ):
    
    
       //decremet when registered users removed users.txt
    	$file_loc="users.txt";
    	chmod ($file_loc,0755);
    	$newfile = fopen($file_loc, "r");
    	$file_contents = fread($newfile, filesize($file_loc));
            $file_contents=$file_contents-1;   //value contains how many users
    	$newfile = fopen($file_loc, "w+");
    	fwrite($newfile, "$file_contents");
    	fclose($newfile);
    	chmod ($file_loc,0700);       // end of adding data to file
    	endif;
       endif;   //end of reloadme
    //counting of users
    	$file_loc = "users.txt";
    //	chmod ($file_loc,0644);
    	$whattoread = fopen($file_loc, "r");
    	$file_contents = fread($whattoread, filesize($file_loc));
    	fclose($whattoread);
    //	chmod ($file_loc,0755);       // end of adding data to file
    //end of counting
    
    
    
        $query="select * from users order by id";
        $result=mysql_query($query);     // for first while	
        $result1=mysql_query($query);   // for second while
    	print "<table border=1 cellspacing=0 cellpadding=0 bordercolor=#007898><tr><td>";   //external table
    	print "<table border=0 cellspacing=2 cellpadding=2 width=590><tr><td>
    	<form action=$PHP_SELF method=post><select name=\"user1\" class=select1><option value=\"selectuser\"> Select user ";
        while($row=mysql_fetch_object($result)):	
    	print"<option value=\"$row->login\" style=\"background-color:#FFFFFF;\">$row->login";	
    	endwhile;
    	print "</select><br>
    	<input type=hidden name=remove>
    	<input type=hidden name=show>
    	<input type=hidden name=admin_login value=$admin_login_compare>";   // to enter one more time to login.php
    	print "<input type=hidden name=admin_password value=$admin_password_compare>"; // if ($admin_password!=$admin_password_compare) etc....
    	print "<input type=submit value=\"Remove User\" class=button1></form>";
    
    //reload this page
    	print "<form action=$PHP_SELF method=post>
    	<input type=hidden name=show>
    	<input type=hidden name=admin_login value=$admin_login_compare>";   // to enter one more time to login.php
    	print "<input type=hidden name=admin_password value=$admin_password_compare>"; // if ($admin_password!=$admin_password_compare) etc....
    	print "<input type=hidden name=reloadme ><input type=submit value=Reload  class=button1></form>";
    
    
    	print "Counter: $file_contents users
    	</td>";
    
    
    	print "<td>
    	<table border=1 cellspacing=0 cellpadding=4 bordercolor=#007898><tr><td>ID</td><td>Login</td><td>Password</td><td>Email</td><td>Last visit (Y/M/D)</td></tr></tr>";
        while($row=mysql_fetch_object($result1)):	
            print "<tr>";
    	print "<td>$row->id</td>";
    	print "<td><a href=\"javascript:showuserdata('$row->login','$row->address','$row->fax','$row->tel','$row->site')\" title=\"Show about $row->login\">$row->login</td>";
    	print "<td>$row->password </td>";
    	print "<td><a href=\"mailto:$row->email\" title=\"Email to $row->login\">$row->email</td>";
    	print "<td>$row->last_date</td>";
    	print "</tr>";
    	endwhile;
    	print "</table></td></tr></table>";
    	print "	</table>";  //end of external table
    	print "<br>&nbsp; Click user name to view data about him";
    
    	exit;
    
    ?>

    ITdocer, 23 Октября 2011

    Комментарии (4)
  4. Pascal / Говнокод #8282

    +84

    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
    program index;
    uses crt;
    const y=20;
    var a:array[1..y]of Integer;
        i,
        j,
        x,
        Found:Integer;
    begin
      clrscr;
      Found:=0;
      for i:=1 to y do
      begin
        WriteLn('Vvedite ',i,'- and element massiva');
        ReadLn(a[i]);
      end;
      Write('Vvedite X=');
      ReadLn(x);
      for i:=1 to y do
        for j:=i+1 to y do
        begin
          if (x=(Sqr(a[i])+Sqr(a[j]))) then
          begin
            Found:=Found+1;
            WriteLn('a=',a[i],' b=',a[j]);
          end;
        end;
      if Found=0 then
            WriteLn('Takih chisel net');
      ReadLn;
    end.

    одномерный числовой масив

    ITdocer, 23 Октября 2011

    Комментарии (29)
  5. Pascal / Говнокод #8281

    +146

    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
    program chet;
    uses crt;
    var a,
        b,
        x,
        y:Integer;
    begin
      clrscr;
      Write('Vvedite X=');
      ReadLn(x);
      Write('Vvedite Y=');
      ReadLn(y);
      for a:=0 to 30000 do
        for b:=0 to 30000 do
        begin
          if (a+b=x)and(a*b=y) then
          begin
            Write('a=',a);
            WriteLn('b=',b);
          end;
        end;
      ReadLn;
    end.

    находи все возможные пары A и B!

    ITdocer, 23 Октября 2011

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

    +147

    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
    program s_27;
    uses crt;
    function SummaCifr(n:integer):byte;
    
    var s,
        x:integer;
    {----------------------------------------------------------------------------}
    begin
      clrscr;
      s:=0;
      x:=n;
      while x>0 do begin
        s:=s+(x mod 10);
    
        x:=x div 10;
      end;
      SummaCifr:=s;
    end;
    {----------------------------------------------------------------------------}
    var i,k:integer;
    begin
      i:=2;
      k:=99;
      while SummaCifr(k)<>27 do
      begin
        k:=i*99;
        inc(i);
      end;
      WriteLn('Rezult:',k);
      ReadLn;
    end.

    поиск числа!

    ITdocer, 23 Октября 2011

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