Справка к Borland C++ v3.1 ЖЖОТ!!!

 sound, nosound

sound turns the PC speaker on at the specified frequency
nosound turns the PC speaker off

Declaration:
void sound(unsigned frequency);
void nosound(void);

Remarks:
sound turns on the PC’s speaker at a given frequency.
nosound turns the speaker off after it has been turned on by a call to
sound.

frequency specifies the frequency of the sound in hertz (cycles per second).

Return Value: None

Portability:


 DOS  UNIX  Windows  ANSI C  C++ Only
 Yes        

See Also:
delay

Example (for both functions):
/* Emits a 7-Hz tone for 10 seconds.
True story: 7 Hz is the resonant
frequency of a chicken’s skull cavity.
This was determined empirically in
Australia, where a new factory
generating 7-Hz tones was located too
close to a chicken ranch: When the
factory started up, all the chickens
died.

Your PC may not be able to emit a 7-Hz tone. */

#include < DOS.H>
int main(void)
{
sound(7);
delay(10000);
nosound();
return 0;
}

З.Ы.
Если не вкурили в чём прикол, то читайте внимательней комменты к проге :)))))))

Запись опубликована в рубрике Компьютерное. Добавьте в закладки постоянную ссылку.

Добавить комментарий