Kori�tenje funkcija (II)
function randint(){return (int((rand()+1)*10))}
BEGIN {
prize[randint(),randint()] = "$100";
prize[randint(),randint()] = "$10�;
prize[1,1] = "the booby prize�
}
{
if (($1,$2) in prize)
printf "You have won %s!\n", prize[$1,$2]
}
Previous slide
Next slide
Back to first slide
View graphic version