Guest User

Untitled

a guest
Aug 23rd, 2019
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2. k,a,b:integer;
  3. begin
  4. writeln('Guess a Number Game');
  5. writeln('Guess.What number do i have?');
  6. randomize;
  7. a:=random(100);
  8. k:=0;
  9. while a<>b do
  10. begin
  11. k:=k+1;
  12. write('Number = ');
  13. readln(b);
  14. if a>b then
  15. writeln('too little')
  16. else
  17. if a<b then
  18. writeln('too much')
  19. else
  20. writeln('Congratulations!You Win!')
  21. else
  22. if k>6 then
  23. writeln('Game Over');
  24. end;
  25. end.
RAW Paste Data