i made this out of sheer boredom :p
SCAR Code:program Chance;
var
h, t, rolled, fliped : integer;
number1, number2, number3, number4, number5, number6 : integer;
const
tries = 10; //how many times would you like to give your shot at chance?
option = 'dice';
{valid options:
dice
coin }
procedure flip;
begin
case random(2) of
0: inc(h);
1: inc(t);
end;
inc(fliped);
wait(1);
end;
procedure coincheck;
begin
while fliped < tries do flip;
writeln('out of ' + inttostr(tries) + ' flips');
writeln(inttostr(h) + ' have been heads');
writeln('and ' + inttostr(t) + ' have been tails');
writeln(' ');
writeln(' ');
end;
function coin : boolean;
begin
if option = 'coin' then
begin
coincheck;
result := true;
end;
end;
procedure roll;
begin
case random(6) of
0: inc(number1);
1: inc(number2);
2: inc(number3);
3: inc(number4);
4: inc(number5);
5: inc(number6);
end;
inc(rolled);
wait(1);
end;
procedure dicecheck;
begin
while rolled < tries do roll;
writeln('out of ' + inttostr(tries) + ' tries');
writeln('you rolled the number 1 ' + inttostr(number1) + ' times');
writeln('you rolled the number 2 ' + inttostr(number2) + ' times');
writeln('you rolled the number 3 ' + inttostr(number3) + ' times');
writeln('you rolled the number 4 ' + inttostr(number4) + ' times');
writeln('you rolled the number 5 ' + inttostr(number5) + ' times');
writeln('you rolled the number 6 ' + inttostr(number6) + ' times');
writeln(' ');
end;
function dice : boolean;
begin
if option = 'dice' then
begin
dicecheck;
result := true;
end;
end;
procedure play;
begin
coin;
dice;
end;
begin
cleardebug;
play;
end.
instructions:
put in how many times you want to roll the dice/ flip the coin
select if you want to roll the dice or flip the coin :p
maybe if i'm really bored later i'll add more to it, like forms and mathematical stuff

