在程序结束时添加
print *, char(7)
原理:char(7) is the bell character. This sounded the bell on the old teletypes. When VDUs came along, the bell was replaced by a beep.
实测win10会产生系统自带的操作提示音。
原网站:https://stackoverflow.com/questions/15960522/generate-sound-beep-in-fortran-90-95