ex16.pp 320 B

123456789101112131415161718
  1. Program Example16;
  2. uses Crt;
  3. { Program to demonstrate the Sound and NoSound function. }
  4. var
  5. i : longint;
  6. begin
  7. WriteLn('You will hear some tones from your speaker');
  8. while (i<15000) do
  9. begin
  10. inc(i,500);
  11. Sound(i);
  12. Delay(100);
  13. end;
  14. WriteLn('Quiet now!');
  15. NoSound; {Stop noise}
  16. end.