Guess the number/With feedback: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) (Added Arturo implementation) |
Not a robot (talk | contribs) (Add VTL-2) |
||
Line 4,497: | Line 4,497: | ||
} |
} |
||
}</lang> |
}</lang> |
||
=={{header|VTL-2}}== |
|||
<lang VTL2>10 ?="Minimum? "; |
|||
20 L=? |
|||
30 ?="Maximum? "; |
|||
40 H=? |
|||
50 #=L<H*80 |
|||
60 ?="Minimum must be lower than maximum." |
|||
70 #=10 |
|||
80 S='/(H-L+1)*0+L+% |
|||
90 T=0 |
|||
100 ?="Guess? "; |
|||
110 G=? |
|||
120 #=G>L*(H>G)*150 |
|||
130 ?="Guess must be in between minimum and maximum." |
|||
140 #=100 |
|||
150 T=T+1 |
|||
160 #=G=S*220 |
|||
170 #=G<S*200 |
|||
180 ?="Too high." |
|||
190 #=100 |
|||
200 ?="Too low." |
|||
210 #=100 |
|||
220 ?="Correct!" |
|||
230 ?="Tries: "; |
|||
240 ?=T</lang> |
|||
{{out}} |
|||
<pre>Minimum? 10 |
|||
Maximum? 90 |
|||
Guess? 91 |
|||
Guess must be in between minimum and maximum. |
|||
Guess? 9 |
|||
Guess must be in between minimum and maximum. |
|||
Guess? 50 |
|||
Too low. |
|||
Guess? 70 |
|||
Too high. |
|||
Guess? 60 |
|||
Too high. |
|||
Guess? 55 |
|||
Correct! |
|||
Tries: 4</pre> |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |