QASIC PROGRAM TO CHECK HEARING
REM ultrasonic_test
CLS
freq = 20000
DO
PRINT "Frequency is:"; freq
SOUND freq, 18.2
INPUT "Can you hear?"; ans$
IF ans$ = "no" THEN
freqrange = freq
GOTO 10
END IF
freq = freq + 100
LOOP
10
freq = freqrange
DO
PRINT "frequency is:"; freq
SOUND freq, 18.2
INPUT "can you hear?"; ans$
IF ans$ = "no" THEN
PRINT "your max frequency is:"; freq
END
END IF
freq = freq + 2
LOOP
0 Comments