Guess the number/With feedback (player): Difference between revisions
Content added Content deleted
(→with positive integers: added/changed comments and statements, simplified the program.) |
m (→with positive integers: elided a dead statement.) |
||
Line 2,268: | Line 2,268: | ||
if low=='' | low=="," then low= 1 /*Not specified? Then use the default.*/ |
if low=='' | low=="," then low= 1 /*Not specified? Then use the default.*/ |
||
if high=='' | high=="," then high= 1000 /* " " " " " " */ |
if high=='' | high=="," then high= 1000 /* " " " " " " */ |
||
⚫ | |||
if frac=='' | frac=="," then frac= 1 /* " " " " " " */ |
|||
⚫ | |||
?= random(low, high) /*generate random number from low->high*/ |
?= random(low, high) /*generate random number from low->high*/ |
||
$= "──────── Try to guess my number (it's between " /*part of a prompt message.*/ |
$= "──────── Try to guess my number (it's between " /*part of a prompt message.*/ |