int buzzer = 8;
int i = 0,aclick = 100;
int music[500] = {6,0,10,0,9,10,0,7,0,8,0,10,9,8,7,6,0,6,10,0,9,
10,0,7,0,8,0,10,5,0,5,0,6,0,10,0,9,10,0,7,0,8,0,10,9,8,7,6,0,6,10,
0,9,10,0,7,0,8,0,10,5,0,5,0,6,0,8,0,7,8,7,0,9,0,8,0,7,8,7,5,6,0,10,
0,9,10,9,10,11,0,10,0,9,0,10,0,6,0,8,0,7,8,7,0,9,0,8,0,7,8,7,5,6,0,
10,0,9,10,9,10,12,0,10,0,9,0,10,0,6,0,8,0,7,8,7,0,9,0,8,0,7,8,7,5,6,
0,10,0,9,10,9,10,11,0,10,0,9,0,10,0,9,0,0,0,0,9,9,10,0,9,0,8,0,7,0,6,
0,0,0,0,0,-1};
int scale[50] = {0,131,147,165,175,196,220,247,262,294,330,392,440,494};
void setup() {
pinMode(buzzer,OUTPUT);
}
void loop() {
if(music[i] == -1)i = 0;
mtone(scale[music[i]]);
i++;
}
void mtone(int f) {
tone(buzzer,f);
delay(aclick);
noTone(buzzer);
}

Hubert's Coding Notes
Useful notes for CS people