//Programm to generate sound like a piano... by akshay
#include < conio.h >
#include < dos.h >
#include < fstream.h >
void akshay(int a)
{
sound((a*8)/2);
delay(300);
nosound();
}
void main (char *argv[])
{
char ashu;
fstream file1;
file1.open(argv[1],ios::out);
clrscr();
cout<<"Hello friends this is akshay\n & this is a PIANO programm \n To generate sound like a piano.. \n";
cout<<<<"Press `q' to exit.";
while(ashu!='q')
{
akshay(ashu);
ashu=getch();
if(ashu!='q')
file1.put(ashu);
}
file1.close();
}
#include < conio.h >
{
char ashu;
fstream file1;
file1.open(argv[1],ios::out);
clrscr();
cout<<"Hello friends this is akshay\n & this is a PIANO programm \n To generate sound like a piano.. \n";
cout<<<<"Press `q' to exit.";
while(ashu!='q')
{
akshay(ashu);
ashu=getch();
if(ashu!='q')
file1.put(ashu);
}
file1.close();
}