Posted on

Intro to Arrays

Share This!

Use your Array notes in class to complete the following exercises

//Musical Notes
NOTE_B0 31
NOTE_C1 33
NOTE_CS1 35
NOTE_A3 45
NOTE_G3 67
NOTE_B3 1100
NOTE_C4 467

// Melody
int melody[] = {
};

1. What does the number next to each of the notes above mean?
2. Follow the model above and write a new note.
3. Examine the code above and explain what you would need to do in order to play three notes.
4. Look at the above code and write the code needed to place the melody into a loop