10 Oct 2019

  • October 10, 2019
  • Amitraj
Happy Birthday sound in C:-




#include<dos.h>
#include<stdio.h>
int main(void)
{
float g3=195,a3=220,c4=263,b3=247,d4=293,g4=393,e4=330,f4=351;

sound(g3);
delay(100);
nosound();
sound(g3);
delay(500);
nosound();
sound(a3);
delay(500);
nosound();
sound(g3);
delay(500);
nosound();
sound(c4);
delay(500);
nosound();
sound(b3);
delay(1000);
nosound();
//delay(500);

sound(g3);
delay(100);
nosound();
sound(g3);
delay(500);
nosound();
sound(a3);
delay(500);
nosound();
sound(g3);
delay(500);
nosound();
sound(d4);
delay(500);
nosound();
sound(c4);
delay(1000);
nosound();

sound(g3);
delay(100);
nosound();
sound(g3);
delay(500);
nosound();
sound(g4);
delay(500);
nosound();
sound(e4);
delay(500);
nosound();
sound(c4);
delay(500);
nosound();
sound(a3);
delay(1000);
nosound();

sound(g4);
delay(100);
nosound();
sound(g4);
delay(500);
nosound();
sound(f4);
delay(500);
nosound();
sound(c4);
delay(500);
nosound();
sound(d4);
delay(500);
nosound();
sound(c4);
delay(500);
nosound();
return 0;
}


Translate

Popular Posts