카테고리 없음

주파수 생성 재생하는 프로그램

바로이순간 2012. 4. 7. 16:08

#include <stdio.h>

#include <stdlib.h>

#include <time.h>

#include <conio.h>

#include <windows.h>


int main() {

  int x, y, n;

  char ch;


  srand(time(NULL));

  while(!kbhit()) {

    x=(rand()%80)+20; // x는 20과 100 범위에 있다.

    y=(rand()%3000)+50; // y는 50과 3050 범위에 있다.

    Beep(y,x);

  }


  return 0;

}