123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home

Source Codes

BE Students

Training  Reports (updated)

Placement Papers (updated)

Forums

   Computer Science / IT

   Electronics

   Electrical

   Mechanical

   Chemical

   Civil

   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs

Sitemap

About-Us

Terms of use

Displaying  Source Code(s)  
 

 
Piano

--------------------------------------------------------------------------------

Description : On pressing the keys many type tunes will be produced.

// PIANO saves output in c:piano.txt



#include<conio.h>
#include<dos.h>
#include<fstream.h>

void jain(int a)
{
sound((a*8)/2);
delay(300);
nosound();
}

void main(int argc,char *argv[])
{
char anuj;
fstream file1;
file1.open(argv[1],ios::out);
clrscr();
cout<<"PIANO "<<"


Press `q' to exit.<BR>;
while(anuj!='q')
{
jain(anuj);
anuj=getch();
if(anuj!='q')
file1.put(anuj);
}
file1.close();
}

 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG