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

Demonstrate the skill of creating a dynamic web page

Demonstrate the skill of creating a Web page that delivers audio and/or video content. Design and develop a Web site that includes at least two Web pages that meet the follo

The concepts of logical and physical data independence

Explain the difference between external, internal, and conceptual schemas. How are these different schema layers related to the concepts of logical and physical data indepen

Find at least five different error messages

Make various changes to cause different error messages. Find at least five different error messages. Write down each error message and what change you introduced to provoke

Describe the 3-level ansi-sparc architecture

Describe the 3-level ANSI-SPARC architecture and discuss how the use of this will promote data independence to save time in the long run. Define Data Independence. What is mea

What iq score do you need to be considered a genius

Mensa. People with z-scores above 2.5 on an IQ test are sometimes classified as geniuses. If IQ scores have a mean of 100 and a standard deviation of 16 points, what IQ scor

Should green design adopt erp

After several years as a successful architectural firm in Southern California, Green Design decided to expand by adding two new business ventures: a civil engineering projec

Write a program that checks whether the graph is cyclic

Let's have as given a graph G(V, E) and two of its vertices x and y. Write a program that finds the shortest path between two vertices measured in number of vertices staying

Determine features and capacities of ram-disk storage

Determine the features and capacities (RAM, disk storage, processor speed) that Amy should include in the Web server computer that she will need for her site.

Reviews

Write a Review

 
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