Answer:
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main()
{
float f0;
cout<<"Initial Frequency: ";
cin>>f0;
for(int n = 1; n<=5;n++)
{
cout<<f0<<setprecision(2);
f0 = f0 * pow(2.0,1.0/12);
cout<<" ";
}
return 0;
}
Explanation:
The programming language is not stated; However, one can easily deduce that the program is to be written using C++
The following libraries enable the program to make use of some built in functions
<em>#include<iostream>
</em>
<em>#include<iomanip>
</em>
<em>#include<cmath>
</em>
using namespace std;
int main()
{
This line declares the initial frequency as float
float f0;
This line prompts user for input
cout<<"Initial Frequency: ";
This line gets user input
cin>>f0;
The following iteration calculates and prints the frequency for thenexr 4 keys
<em>for(int n = 1; n<=5;n++)
</em>
<em> {
</em>
<em> cout<<f0<<setprecision(2);
</em>
<em> f0 = f0 * pow(2.0,1.0/12);
</em>
<em> cout<<" ";
</em>
<em> } </em>
return 0;
}