Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}(rand() % 6)+1#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}Corsix wrote:But what about D3s and D8s?
actually it would be(1->6, not 0->5)
- Code: Select all
(rand() % 6)+1
((rand() / RAND_MAX) * d) + 1;public class Dice {
public:
Dice(int sides) {
i_sides = sides;
}
Dice() {
i_sides = 6;
}
int roll() {
return ((rand() / RAND_MAX) * i_sides) + 1;
}
private:
int i_sides;
};#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}Wizard wrote:
- Code: Select all
((rand() / RAND_MAX) * d) + 1;
srand(time(0));
...
int Random(int min, int max)
{
return rand()%(max+1-min)+min;
}
Invictus wrote:
- Code: Select all
int Random(int min, int max)
{
static srand(time(0));
return rand()%(max+1-min)+min;
}
static int dummy=srand(time(0));Users browsing this forum: No registered users and 1 guest