Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can you help with c++ 17.3 LAB 17: Musical note trequencies using a tor loop On a piano, a key has a frequency, say fo.
can you help with c++
17.3 LAB 17: Musical note trequencies using a tor loop On a piano, a key has a frequency, say fo. Each higher key (black or white) has a frequency of f0rn, where n is the distance (number of keys) from that key, and r is 2(1/12). Given an initial key frequency, output that frequency and the next 4 higher key frequencies. NOTE: You must use a for loop. Output each floating-point value with two digits after the decimal point, which can be achieved by executing cout fixed setprecision (2); once before all other cout statements. Ex: If the input is: 440.0 (which is the A key near the middle of a piano keyboard), the output is: Note: Use one statement to compute r=2(1/12) using the pow function (remember to include the cmath library). Then use that r in subsequent statements that use the formula fn=f0rn with n being 1,2,3, and finally 4 . Note: setprecision requires you to include the iomanip header fileStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started