Program in c language for AIRTEL TUNE...
DESCRIPTION:- This program rings the airtel company tune .When you run this program you will hear the airtel tune.
SOURCE CODE:-
#include<dos.h>
#include<stdio.h>
#include<conio.h>
float main(void)
{
float A,Bb,D,G,F;
A = 440;
G = 780;
Bb = 461;
D = 586;
F = 687;
sound(G);
delay(500);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*D);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*Bb);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(500);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound(); if(kbhit()) return 0;
//end 1
sound(G);
delay(500);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*D);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*Bb);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(500);
nosound(); if(kbhit()) return 0;
//Continuation......
sound(2*A);
delay(500);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound(); if(kbhit()) return 0;
//end 2
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound(); if(kbhit()) return 0;
//end 3
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound(); if(kbhit()) return 0;
return 0;
}
/*
THANKU.
DESCRIPTION:- This program rings the airtel company tune .When you run this program you will hear the airtel tune.
SOURCE CODE:-
#include<dos.h>
#include<stdio.h>
#include<conio.h>
float main(void)
{
float A,Bb,D,G,F;
A = 440;
G = 780;
Bb = 461;
D = 586;
F = 687;
sound(G);
delay(500);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*D);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*Bb);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(500);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound(); if(kbhit()) return 0;
//end 1
sound(G);
delay(500);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*D);
delay(500);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*Bb);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(500);
nosound(); if(kbhit()) return 0;
//Continuation......
sound(2*A);
delay(500);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound(); if(kbhit()) return 0;
//end 2
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound(); if(kbhit()) return 0;
//end 3
sound(2*A);
delay(250);
nosound(); if(kbhit()) return 0;
sound(G);
delay(250);
nosound(); if(kbhit()) return 0;
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound(); if(kbhit()) return 0;
return 0;
}
/*
THANKU.
0 comments:
Post a Comment