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

  Discuss a minimum of three mobile computer

Discuss a minimum of three mobile computer devices that you used or came in contact with (from the daily journal or that you are familiar with).

  Complete frame for transmission

In the CRC error detection scheme, the chosen pattern is P(x) = x 4 + x + 1. Given the message bits D=10010011011, determine the FCS bits to be added to make the complete frame for transmission.

  Business for opening a business in a foreign country

Create a research paper that lists and explains the methods available to a business for opening a business in a foreign country.

  What is the standard error

If you draw a sample of four observations what is the standard error? Answer to four decimal places.

  Asked regarding the computer system

What can be done to restore these deleted files and what questions should be asked regarding the computer system?

  What is a pivot table in google drive

What is a pivot table in google drive/excel and what do you do with one? Can you give an example?

  How often are network standards reviewed

1. How often are network standards reviewed? The standards are reviewed and updated approximately every 5 years. 2. What category of UTP cabling is the minimum for a telephone cable? Cat 5 is used for telephone cable, before Cat 5, Cat 3 was used.

  Arguments for and the arguments against globalization

QUESTION 1: What are the arguments for and the arguments against globalization?

  Pd3 this assignment consists of two 2 sections a design

this assignment consists of two 2 sections a design document and a revised gantt chart or project plan. you must submit

  Find the length of the tube and the power required to heat

The heat exchanger consists of a 50-mm-ID tube with a surface temperature maintained uniformly at 500°C by an electric heater. Find the length of the tube and the power required to heat 4 kg/s and 8 kg/s of bismuth.

  What is the probability

For instance, if a blue ball is picked then it is replaced by a red ball and vice-versa. The process is repeated ten times and then a ball is picked from the box. What is the probability that this ball is red?

  Subroutine memcmp for performing a byte-by-byte comparison

The subroutine should accept three input parameters in registers representing the first address, the second address, and the length of the sequences to be compared. It should use a register to return the count of the number of comparisons that do ..

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