- 1
- 2
- 3
- 4
- 5
- 6
- 7
#include <cstdlib>
#include <ctime>
main(){
    srand((unsigned)time(NULL));
    int x = 1^~0-(((1+&x?2||0:(~1))-(1 & 2)*.1-(1+-1?5:3)%1)==0?10:-rand()%5+1);
    return 0;
}Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 2
+88
#include <cstdlib>
#include <ctime>
main(){
    srand((unsigned)time(NULL));
    int x = 1^~0-(((1+&x?2||0:(~1))-(1 & 2)*.1-(1+-1?5:3)%1)==0?10:-rand()%5+1);
    return 0;
}perl'овцы развлекаются.
+139
#include <stdio.h>
#include <stdlib.h>
#define value_i int
#define gen_program main()
#define begin {
#define end }
#define sep ;
#define back_val return
#define vis(a) printf ("%d", a)
#define ln printf ("\n")
#define ln3 printf ("\n\n\n")
#define cycle_count for
#define rand rand()
#define gen_rand srand((unsigned)time(NULL))
#define value_c char
#define vis_c(a) printf("%c", a)
#define eq =
#define uneq !=
#define check ==
#define inc(a) a++
#define res %
#define add +
#define sub -
#define blank void
#define small <
#define big >
blank line(blank) sep
value_i gen_program
begin
    value_i x, i                                sep
    gen_rand                                    sep
    value_c c eq ' '                            sep
    cycle_count(i eq 1 sep i small 10 sep inc(i))
    begin
        x eq rand res 10 add 1                  sep
        if (x uneq 10)
        begin
            vis(x)                              sep
            vis_c(c)                            sep
        end
    end
    ln3                                         sep
    line()                                      sep
    ln                                          sep
    back_val 0                                  sep
end
blank line(blank)
begin
    value_i i sep
    cycle_count (i eq 0 sep i small 10 sep inc(i) )
    begin
    printf("-/*\\")                                sep
    end
    printf("-")                                    sep
endМожно рефакторить.