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
For this question you must write a java class called Rectangle and a client class called RectangleClient. The partial Rectangle
polet [3.4K]

Answer:

Java.

Explanation:

public class Rectangle {

   private int x;

   private int y;

   private int width;

   private int height;

   ///////////////////////////////////////////////////////////

   public Rectangle(int inX, inY, inWidth, inHeight) {

       x = inX;

       y = inY;

       width = inWidth;

       height = inHeight;

   }

   ///////////////////////////////////////////////////////////

   public int getX() {

       return x;

   }

   public int getY() {

       return y;

   }

   

   public int getWidth() {

       return width;

   }

   public int getHeight() {

       return height;

   }

   ///////////////////////////////////////////////////////////

   public int getArea() {

       return width * height;

   }

   public bool isSquare() {

       if (width == height) {

           return true;

       }

       else

           return false;

   }

   ///////////////////////////////////////////////////////////

   public String toString() {

       return "Rectangle located at (" + x + "," + y + ")" + "with dimensions " + width + "x" + height + "and " + getArea() + "is the area.";

   }

}

8 0
3 years ago
you are researching the Holocaust for a school paper and have located several Web sites for information. In a paragraph of no le
jeka94
1. .com .org .edu those have a big part because .com is profit and .org is non profit. 
2. It shows who wrote it 
3. It shows a bio of who wrote it (So you know their actually qualified) 
4. And it has sources to back up for what they say.
7 0
3 years ago
How secure is a password protected word document?
tensa zangetsu [6.8K]
Secure enough to keep someone out who get on your pc but you should encrypted it so no one o the pc or remotely access it with out a password or with out decrypting it
8 0
4 years ago
Since JavaScript is case sensitive, one of the variables below needs to be
marusya05 [52]

Answer:

var is Good = FALSE needs to be fixed

bottom answer is method.

Explanation:

var is Good = FALSE because you are assigning a boolean and in js booleans are all lower case.

Functions that are stored in object properties are called “methods”

5 0
3 years ago
Which option can be used to access more settings than are available in the Backstage view?
Sedaia [141]

Answer:

Orientation settings

Explanation:

Orientation setting or general settings, we can find more options in Excel, we can make general and even advance setting with these options in the backstage view, the language and tabs can be changed in this section, the options are:

  • General
  • Formulas
  • Proofing
  • Save
  • Language
  • Advanced
  • Customize Ribbon
  • Quick access toolbar
  • Add-ins
  • Trust Center
6 0
4 years ago
Read 2 more answers
Other questions:
  • What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the
    10·1 answer
  • "Most of us know that when we come into a college classroom, we will see desks and chairs, a computer station and a projector. A
    6·1 answer
  • Given the following characteristics for a magnetic disk pack with 10 platters yielding 18 recordable surfaces (not using the top
    14·1 answer
  • Henry created a software that manages all of his music. He wishes to run software on another computer system that runs an operat
    8·1 answer
  • To recover from driving off the road steer back onto the road in then ?
    14·2 answers
  • I need help with this plz question 2 and 3 asap
    7·1 answer
  • A pointer is the memory address of a variable. FALSE TRUE
    9·1 answer
  • A particular problem is currently not able to be practically solved by using an algorithm. Which of the following statements abo
    13·2 answers
  • Rebecca is an interior designer. What is her job role? need this asap
    9·1 answer
  • 1) The critical path of a network is the A) shortest time path through the network. B) path with the fewest activities. C) path
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!