Hey friends it's very interesting to play some music in c language as all we know we can produce sound in c programs like "beep" but if we can sequencing these beep in some order we can make really good sound.
Hope u will enjoy this one ......
code is here ..
//////////////////music////////////////////////
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
clrscr();
float maz[10]={130,146.83,164.81,174.61,196,220,246.94};
int n,i;
for(i=0;i<10;i++)
{
sound(maz[i] * 4);
delay(100);
}
nosound();
}
No comments:
Post a Comment