I'm not getting the correct frequencies. When I execute ./notes, C4 through G#4 all return 220, and A4 through B4 return 440.
I've determined that the problem must be with pow(), I just don't know what to do about it. The value of my variable int index calculates as expected.
Note that I'm working from A0 = 27.5 Hz, rather than A4 = 440 Hz. Here's my code:
[edited out code per academic honesty guidelines]
// Multiply A0 by 2^(n/12), round result, cast as int return (int)(round(pow(2, index / 12) * 27.5)); }