SUPERIOR REVISED CAT CODE
Program Cat;
Uses Crt;
Var
Dead : Boolean;
YourLife,
CatLife : Byte;
{ No procs this time.. who cares? }
Begin
CatLife := 9; { Gee I wonder how the odds are stacked }
YourLife := 1;
Randomize;
Repeat
If Random > .2 then CatLife := Catlife - 1 else
YourLife := YourLife - 1;
If CatLife = 0 then Dead := TRUE;
If YourLife = 0 then Dead := TRUE;
Until Dead;
If CatLIfe = 0 then Writeln( 'The cat died.' ) else
Writeln( 'You died.' );
End.
Related:
In 1978, the developers of the C programming
In 1978 he developers of the C programming
language (Kernighan and Ritchie) introduced
their new language to the world in a book
titled "THE C PROGRAMMING LANGUAGE....