#include #include #include #include #include #include int main() { char taste[4][10],tasta='1'; strcpy(taste[0],"zxcvbnm,./"); strcpy(taste[1],"asdfghjkl;"); strcpy(taste[2],"qwertyuiop"); strcpy(taste[3],"1234567890"); double nota,x; int i,j,n,ok; while(tasta!='0') {ok=0; for(i=0;i<=3&&ok==0;i++) for(j=0;j<=9&&ok==0;j++) if(tasta==taste[i][j]) { ok=1; n=i*5+j; } x=pow(2,n*1.0/12); nota=164.82*4*x; for(i=0;i<=10;i++) Beep(nota+pow(2,i),1); tasta=getch(); } return 0; }