-
Лучший говнокод
- В номинации:
-
- За время:
-
-
+14
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
#include <iostream>
#include <conio.h>
#include <math.h>
using namespace std;
int main()
{
setlocale(0,"Russian");
cout<<"Пишиш без a,b,c,приклад: 2 5 -12 або натиснеш на Enter и пишеш вниз,"<<endl;
cout<<"ПИШИ:"<<endl;
float D;
int repetare=0;
int a;
int b;
int c;
int x1;
int x2;
repetare;
{
while(repetare<100)
{
cout<<"a=";
cin>>a;
cout<<"b=";
cin>>b;
cout<<"c=";
cin>>c;
D=(b^2-(4*a*c))*(-1);
x1=(b-sqrt(D))/(2*a);
x2=(b+sqrt(D))/(2*a);
if (D>0)
{
cout<<"D="<<D<<endl;
cout<<"x1="<<x1<<endl;
cout<<"x2="<<x2<<endl;
cout<<"Имеет два кореня"<<endl;
}
if (D<0)
{
cout<<"D="<<D<<endl;
cout<<"Не имеет кореней"<<endl;
}
if(D=0)
{
cout<<"D="<<D<<endl;
cout<<"x1="<<x1<<endl;
cout<<"Имеет один корень"<<endl;
}
repetare++;
}
}
getche();
return 0;
}
С одного из сайтов игроделов. Просто оставлю это здесь
pelmenka,
16 Августа 2013
-
+103
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
if (s[n][c]='1')and(s[n][c+1]='0')and(s[n+1][c]='0')and(n=1)and(c=1) then writeln('*');
if (s[n][c]='1')and(s[n][c-1]='0')and(s[n+1][c]='0')and(s[n][c+1]='0')and(n=1) then writeln('*');
if (s[n][c]='1')and(s[n][c-1]='0')and(s[n+1][c]='0')and(n=1)and(c=10) then writeln('*');
if (s[n][c]='1')and(s[n-1][c]='0')and(s[n][c-1]='0')and(s[n+1][c]='0')and(c=10) then writeln('*');
if (s[n][c]='1')and(s[n-1][c]='0')and(s[n][c-1]='0')and(n=10)and(c=10) then writeln('*');
if (s[n][c]='1')and(s[n][c+1]='0')and(s[n-1][c]='0')and(s[n][c-1]='0')and(n=10) then writeln('*');
if (s[n][c]='1')and(s[n][c+1]='0')and(s[n-1][c]='0')and(n=10)and(c=1) then writeln('*');
if (s[n][c]='1')and(s[n+1][c]='0')and(s[n][c+1]='0')and(s[n-1][c]='0')and(c=1) then writeln('*');
if (s[n][c]='1')and(s[n][c+1]='.')and(s[n+1][c]='.')and(n=1)and(c=1) then writeln('*');
if (s[n][c]='1')and(s[n][c-1]='.')and(s[n+1][c]='.')and(s[n][c+1]='.')and(n=1) then writeln('*');
if (s[n][c]='1')and(s[n][c-1]='.')and(s[n+1][c]='.')and(n=1)and(c=10) then writeln('*');
if (s[n][c]='1')and(s[n-1][c]='.')and(s[n][c-1]='.')and(s[n+1][c]='.')and(c=10) then writeln('*');
if (s[n][c]='1')and(s[n-1][c]='.')and(s[n][c-1]='.')and(n=10)and(c=10) then writeln('*');
if (s[n][c]='1')and(s[n][c+1]='.')and(s[n-1][c]='.')and(s[n][c-1]='.')and(n=10) then writeln('*');
if (s[n][c]='1')and(s[n][c+1]='.')and(s[n-1][c]='.')and(n=10)and(c=1) then writeln('*');
if (s[n][c]='1')and(s[n+1][c]='.')and(s[n][c+1]='.')and(s[n-1][c]='.')and(c=1) then writeln('*');
Конец решения первой задачи все из той же дистанционки.
На этот раз мопед не мой, а одной юной дамы.
Вот за ЭТО я и недолюбливаю Паскаль: иногда код хер прочитаешь. А еще путаница с типами. И логикой. Гы.
ckopo,
08 Мая 2013
-
+86
- 1
https://github.com/wiistriker/govnokod.ru
Развлечемся?
striker,
17 Марта 2013
-
+95
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
function IntToHex(Num: Int64; Digits: Byte): String;
type
DataInt = Array[0..7] of Byte;
var
I:Byte;
Data: ^DataInt;
begin
Data := @Num;
Result := '';
for I := Trunc(Digits/2)-1 downto 0 do begin
if SizeOf(DataInt) < I then
Result := Result+'00'
else begin
case Data^[I] of
0: Result := Result+'00';
1: Result := Result+'01';
2: Result := Result+'02';
{ ........... }
253: Result := Result+'FD';
254: Result := Result+'FE';
255: Result := Result+'FF';
end;
end;
end;
end;
Давно писал функцию для перевода числа в 16-ричное представление.
Причина - нужно было отдельную функцию без лишнего.
Вот такой вот жестокий быдло код :))
haker,
13 Июня 2012
-
−98
- 1
- 2
- 3
- 4
- 5
- 6
# -*- coding: cp1251 -*-
beer = u"бутылок пива стоят на столе. Одна упала."
botle = 100
for i in range(1, 100):
print (botle-i), beer
print u"Нету больше пива на столе :-("
Пива не будет :-(
Govnocoder#0xFF,
19 Мая 2011
-
+140
- 1
<!-- Скрипт иерархичесского аккардиона -->
Не говнокод, но говноречь - 3 ошибки в 2 словах.
"Девелоперы" научились подключать jQuery, а вот русский язык пока что не осилили.
Эти грамотеи работают на "Первом канале", см. http://www.1tv.ru/videoarchiver/.
ZX_Spectrum,
02 Апреля 2011
-
+159
bot225,
09 Декабря 2010
-
+149
- 1
- 2
- 3
- 4
<?php
@require_once('something-that-doesnot-exists.php');
echo 'My etogo uzhe ne prochitaem((';
?>
Баг ПХП. 4 часа искал методом научного echo. Ошибки не выдает, завершает выполнение как будто вызвали exit() or die(). Растолкуйте в чем суть?
Но всё-таки виновати разработчики CodeIgniter. Они нарушили принцип KISS (keep it simple). Я например, никогда не использую @ (даже незнаю к чему этот отросток).
increazon,
08 Июня 2010
-
+164
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
// set admin mode
switch (true) {
case $nc_core->inside_admin:
$nc_core->admin_mode = true;
break;
case !$passed_thru_404 && isset($posting): // add (edit) action
$nc_core->admin_mode = $admin_mode;
break;
case !$passed_thru_404: //front-office
$nc_core->admin_mode = true;
break;
case $passed_thru_404:
$nc_core->admin_mode = false;
break;
default:
$nc_core->admin_mode = false;
}
/netcat/require/index.php
Что они там курят, что у них настолько извилины выпрямляются?!
telnet,
26 Мая 2010
-
+101
- 1
- 2
- 3
if IntToStr(n) = '2' then begin
/// Еще куча говнокода
end;
Устроился я тут работать в одну компанию... Начинаю серию публикаций... Название компании пока не буду озвучивать - еще уволят нах...
Начнём с чего-нибудь простенького :)
goodron,
28 Апреля 2010