Hello and thank you for your time today. I'm having trouble putting this program together. Basically, a user is prompted to input a number between 10 and 100 and that number determines a note to be output. I'm having trouble determining how to check the input number for a value.
1 2 3 4 5 6 7 8 9
|
while( (inspiration_number >= 10) && (inspiration_number <= 100) )
{
cout<<"Please enter a positive inspiration number: "<<endl;
cin>>inspiration_number;
if (inspiration_number = ??? )
{
cout<<NOTE_A;
}
|
Here is a portion of the code where NOTE_A is the sound output appropriate to
the note value input.
Notes correspond as follows:
note_a = 0, 7, 14, 21... etc
note_bb = 1, 8, 15, 22... etc
note_c++ = 2, 9, 16, 23...
note_d- = 3, 10, 17, 24
note_esharp = 4, 11, 18, 25
First, I'll let you know how I thought about doing this..
is it possible to assign multiple values to a int variable, such as:
int note_a = 14, 21, 28, 35;
int note_bb = 15, 22, 29, 36;
int note_c++ = 16, 23, 30, 37;
int note_d- = 10, 17, 24, 31, 38;