Question: Can someone do this program so I can see how the code should looks for this problem. Musical notes in an octave are denoted by

Can someone do this program so I can see how the code should looks for this problem.

Musical notes in an octave are denoted by A, B, C, D, E, F, and G. (Ignore sharps and flats for this example.)

Sometimes musicians transpose a song, shifting all of the notes by a fixed amount to make it easier to play.

Write a program that helps the musician transpose a song by two notes. More specifically, your program should...

  • Ask the user to enter ten musical notes (A through G), and store them in an array of characters.

Note: Must use an array here.

  • After the user enters each note, check that it is indeed a character A through G. If not, ask the user to re-enter the note.

  • Transpose the array by two steps. In other words, replace in the array all

As -> Cs Bs -> Ds Cs -> Es Ds -> Fs

Es -> Gs Fs -> As Gs -> Bs

  • Output the new array values.

*Hint: You can assign a value to a character using:

char x;

x='A';

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!