codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
char *b1 = new char[dlugosc_genotypu], *b2=b1; int flag=1; for (i = 0; i < dlugosc_genotypu; i++) { if( ((float)rand()/(RAND_MAX + 1.0))< wsk_pop->prawd_pkt_krzyzowania ) flag ^= 1; *b2++ = flag; } b2 = b1; for (i=0;i<dlugosc_genotypu;i++) { if (*b2++) { flag = *genotyp1; *genotyp1++ = *genotyp2; *genotyp2++ = flag; } else { genotyp1++; genotyp2++; } }
Private
[
?
]
Run code
Submit