One statement to compute

Assignment Help Basic Computer Science
Reference no: EM132184854

On a piano, each key has a frequency, and each subsequent key (black or white) is a known amount higher. Ex: The A key above middle C key has a frequency of 440 Hz. Each subsequent key (black or white) has a frequency of 440 * rn, where n is the number of keys from that A key, and r is 2(1/12). Given an initial frequency, output that frequency and the next 3 higher key frequencies. If the input is 440, the output is: 440 493.883 523.251 554.365.

Note: Include one statement to compute r = 2(1/12) using the pow function, then use r in the formula fn = f0 * rn. (You'll have three statements using that formula, different only in the value for n).

(Note 4/17/17: A student noticed that our example and test cases are skipping n=1, starting instead with n=2. We won't change the lab right now, so just assume you've been asked for steps n=2, 3, and 4.)

starting code:

#include <iostream>

#include <cmath>

using namespace std;

int main() {

  int startingFrequency; 

  /* start code here. Include the math library above first. */

  return 0;

}

Reference no: EM132184854

Questions Cloud

Experiences networking in new cultural context : To help you carefully reflect on your experiences networking in a new cultural context,
Presentation-the content or the design : 1. Which is more important about a presentation-the content or the design? Why?
Interstate highway numbers : Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (like the 10 90) go east/west.
Utilitarian ethics when compared with ethics of duties : What are two advantages of a utilitarian ethics when compared with an ethics of duties?
One statement to compute : On a piano, each key has a frequency, and each subsequent key (black or white) is a known amount higher. Ex: The A key above middle C key has
Analyzing the organization of your current workplace : In this assessment you will analyzing the organization of your current workplace.
What product would you like to use to explore supply chain : What product would you like to use to explore the supply chain, and why did you select that specific product? Explain.
Foreign trade and foreign direct investment : Discuss the differences between foreign trade and foreign direct investment.
Analyze court decision in which a physician was found liable : The final case study for this course will require you to analyze a court decision in which a physician was found liable for medical malpractice.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Space station should be discontinued

Comment on the senators reasoning. How would you determine whether the space station should be discontinued?

  Countries in the world are now slowly adopting to green grow

Countries in the world are now slowly adopting to green growth. What is green growth? Please explain in detail

  Acceptable power rating that could be used for circuit

Which resistor has the minimum acceptable power rating that could be used for this circuit?

  Unemployment rate and the labor force participation? rate

In July 1998?, what was the unemployment rate and the labor force participation? rate

  Aeroplane engine maintenance facility

During the 80s the engine maintenance facility of a leading international airline carrier was described as 'an industrial relations mine field'.

  Decrease the money supply in the united states

If Federal Reserve decides to decrease the money supply in the United States, what will happen to: (1) the interest rate; (2) the level of investment spending

  How has using inheritance improved the project so far

Is it necessary for a class with one or more abstract methods to be defined as abstract? If you are not sure, experiment with the source of the Animal class in the foxesand-rabbits-v2 project.

  The lebanese case

During the last civil war (1975-1990), eighty percent of the Lebanese infrastructure was destroyed. The remaining twenty percent are now outdated. The Lebanese banking sector was heavily affected by the war. They lacked the information technology rev..

  Results of these two experiments are independent

- Experiment 1 is successful with probability 2/3 and fails with probability 1/3. -  Experiment 2 is successful with probability 4/5 and fails with probability 1/5. - The results of these two experiments are independent of each other.

  New developments in the area of willpower

Chapter Five, Power Of Habit, focuses closely on new developments in the area of willpower.

  How would you create a monospaced font of point size 20

How would you create a Monospaced font of point size 20 that is bold? Give the Java statement needed.

  Test an appropriate hypothesis and state your conclusion

Pregnancy. In 1998, a San Diego reproductive clinic reported 42 live births to 157 women under the age of 38, but only 7 live births for 89 clients aged 38 and older. Is this strong evidence of a difference in the effectiveness of the clinic's met..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd