<script type="text/javascript"> var ans=prompt('Name a vegetable that is green on the outside and white on the inside. It starts with C.','answer'); if(ans=='Cucumber') alert('Congratulations, answer is right!'); else alert('Wrong answer'); alert('Game over'); </script>
//2 <script type="text/javascript"> var count=0; var ans=prompt('Name a vegetable that is green on the outside and white on the inside. It starts with C.','answer'); if(ans=='Cucumber') count=count+1; ans=prompt('Name a tiny, round green vegetable that grows in pods. It starts with P. Children like it.','answer'); if(ans=='Peas') count=count+1; ans=prompt('What goes up when the rain comes down?','answer'); if(ans=='Umbrella') count=count+1; ans=prompt('I am purple, yellow, red,/and green./The King cannot reach me and neither can the Queen./I show my colours after the rain,/And only when the sun comes out again.','answer'); if(ans=='Rainbow') count=count+1; alert('Count of right answers:'+count); alert('Game over'); </script>
procedure square(var n:integer); begin readln(n); rectangle(window.Center.X-n div 2,window.Center.Y-n div 2,window.Center.X+n div 2,window.Center.Y+n div 2); end;
procedure points(n:integer); Var x,y,i:integer; begin i:=0; while i<1000 do begin x:=random(window.Center.X-n div 2+1,window.Center.X+n div 2-1); y:=random(window.Center.Y-n div 2+1,window.Center.Y+n div 2-1); setpixel(x,y,rgb(random(255),random(255),random(255))); inc(i); end; end;
В унікальності значень