Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Wuerfel

Program wuerfel (output);

var i: integer;
var w1,w2:integer;
var p:integer;

begin
    p:=0;
(*    randomize; *)
    for i:=1 to 100 do
        begin
            w1:=random(6);
            w2:=random(6);
            if w1=w2 then
                begin
                    writeln(w1,' ',w2,' ',w1+w2,' Pasch!');
                    p:=p+1;
                end
            else
                writeln(w1,' ',w2,' ',w1+w2);
        end;
    writeln('Anzahl Pasch: ',p);
    
end.

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.