Skip to main content

A Funny Program in C

The Following Program will convert the keyboard into Piano. Just type the Program and compile it by any C Compiler. Then Run prog and enjoy.
#include<stdio.h>
#include<conio.h>
#include<dos.h>

void main()
{
 char ch;
 
 while (toupper(ch)!='X')
 {
  fflush(stdin);
  ch=getch();
  sound((ch-48)*100);
  delay(100);
 }
 nosound();
}

Comments