1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
QveST [7]
3 years ago
12

On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * rn, 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.
Computers and Technology
1 answer:
sergey [27]3 years ago
6 0

Answer:

The programming language is not stated; so, I'll solve this question using Java programming language

Comments are used for explanatory purpose

//Begin of Program

import java . util.*;

import java. math . RoundingMode;

import java . text . DecimalFormat;

public class keyfreq

{

private static DecimalFormat df = new DecimalFormat("0.00");

public static void main(String [] args)

{

 Scanner input = new Scanner(System.in);

 //Declare variable

 float f0;

//Prompt user for input

System.out.print("Enter Initial Key Frequency: ");

f0 = input.nextFloat();

//Initialize number of keys

int numkey = 1;

//Print first key frequency

System.out.print("Key Frequencies: " + df.format(f0)+" ");  

while(numkey<=4)

{

 //Calculate next frequency

 f0*= Math.pow(2,(1.0/12.0));

 //Print Frequency

 System.out.print(df.format(f0)+" ");  

  //Iterate to next frequency

 numkey++;

}

}

}

//End of Program

Explanation:

See Comments in the above program

See Attachment for source file

Download java
You might be interested in
25 points select 3 options!!!!!!!!!!!!!!!!!!!!!!!!!
Veronika [31]

Answer: don't know sorry

Explanation:

5 0
2 years ago
Read 2 more answers
In which situation is coauthoring of presentations primarily utilized?
fenix001 [56]

Answer:

C) Multiple reviewers have to be able to view one another's changes after they are made.

Explanation:

5 0
3 years ago
What is the final amount stored in value if the computer selects 17 as the
nadya68 [22]

Answer: -17

Explanation:

Our random number is 17. Let's go through line by line.

  1. value is a random number picked which is 17
  2. valueB = 17 / 2 = 8.5
  3. If value is greater than 0 AND value has a remainder of 1, we will set the value to value* -1.
  4. Value is now 17 * -1 = -17

Let's quickly calculate value mod 2. 17 % 2 = is 1. If you're wondering how we did that, the remainder after dividing 8 into 17 twice is 1, because 17 - 16 = 1.

We stop after line 4 because we stop the conditional statement after one condition is filled.

6 0
3 years ago
Use comparison operators to write a question that the database will understand. Which records are more than or the same as three
Semmy [17]

Answer:

>=20

Explanation:

We are required to use the comparison operators, and they are like > , <, <=, >=, !=

We need to use more than or same:

And that is >=3000

And this is the required answer.

6 0
3 years ago
In Microsoft Word, when you highlight existing text you want to replace, you are in
Andreyy89
<span>In Microsoft Word, when you highlight existing text you want to replace, you are in insert mode. You know if you are in insert mode if</span><span> you see the word "Insert" in the Status bar and any text you paste in will push aside text on either side of the cursor.</span>
6 0
3 years ago
Other questions:
  • What makes Group Policy such a powerful tool is its ability to enable security administrators to:_________.
    8·1 answer
  • There is no reason to study the works of famous photographers because they will make you less creative.
    5·2 answers
  • What does phishing mean?
    9·2 answers
  • Open IDLE. Create a new script file (File--&gt;New File, Ctrl n on Windows, Cmd n on macOS). On the first line, place your name
    6·1 answer
  • You want to substitute one word with another throughout your document. What tool(s) should you use?
    9·1 answer
  • What would be used by a business to assess how the business is working within its organization goals? O A. Information systems B
    8·1 answer
  • When attaching a file or files in outlook 365 you select the attach command and then select the files location
    5·1 answer
  • List three variables that could be used in creating a model that determines the best day to plant corn in a given location. 30 p
    10·1 answer
  • The groups within a tab are collectively<br> known as?
    11·1 answer
  • How to set horizontal text alignment​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!