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
netineya [11]
3 years ago
10

On a piano, a keyu has a frequency, say fo. EACH HIGHER KEY (BLACK AND WHITE) HAS A FREQUENCY OF (F0) * r ^n , where n is the di

stance ( number of keys) from that that key, and r is 2^(1.0/12.0). Given an inital key frequency, output that frequency and the next 4 higher key frequencies. EX: IF THE INPUT IS 440 , THE OUTPUT IS in coral language
Computers and Technology
1 answer:
daser333 [38]3 years ago
3 0

Answer:

// Program is written in Coral Programming Language

// Comments are used for explanatory purpose

// Program starts here

// Variable declaration

float f0

int numkey

//Prompt user for input

Put "Enter Initial Key Frequency: " to output

f0 = Get next input

//Initialize number of keys

numkey = 1

//Print first key frequency

Put "Key Frequencies: " to output

Put f0 to output

put " " to output

for numkey = 1; numkey <= 4; numkey = numkey + 1

  //Calculate next frequency

  f0 = f0 * RaiseToPower(2,(1.0/12.0))

  //Print Frequency

  Put f0 to output

  Put " " to output

//End of Loop

//End of program

Explanation:

Line 1 to Line 4 are comments

Line 5 and 6 are for variable declarations;

On line 5, variable f0 is declared as float

On line 6, variable numkey is declared as integer

Line 7 is a comment

Line 8 prompts user for input

On line 9, the user input us saved in variable f0

Line 11 initialized numkey to 1

Line 13 prints the string "Key Frequencies: " without the quotes

Line 14 prints the value of f0

Line 15 prints a blank

So, if for instance f0 = 440

Line 14 and 15 will print "440 " without the quote

Take note of the space after 440

Line 16 to 22 calculate and print the next 4 frequency using the given formula

You might be interested in
Challenge activity 1.11.1: using constant in expression is not working for me. Can any one help me find the right code?
cestrela7 [59]

Answer:

could you please tell me which grde are you in?

8 0
3 years ago
The association between a UCS and a CS can be extended to include more stimuli (more stimuli related to the CS can elicit the CR
almond37 [142]

Answer:

The answer is Stimulus generalization

Explanation:

Stimulus generalization is an example of classical condition. Classical conditioning takes a stimulus that does not cause a particular response (neutral stimulus) and then pairs it repeatedly with an unconditioned stimulus that will cause an unconditioned response. In the case of Stimulus generalization, I will give an example of a subject presenting food to a dog once they ring a bell. Lets say that you have taught a dog to salivate every time it hears a bell ring. If you took another bell that has a similar sound and rang it, the dog would still salivate and come pick its food. This is a perfect example of Stimulus generalization. The dog has responded to a new stimulus as if it was the initial conditioned stimulus.

5 0
3 years ago
Leah and Santana have been requested to print a daily report of scheduled activities. Their supervisor needs to know if each par
Katyanochek1 [597]

Answer:

Boolean

Explanation:

Boolean is one of the primitive data types that will only hold either true or false value. This data type is commonly used in a variable that will track a status with only two possible outcomes.

For example, the<em> ParticipantPD</em> field is to track the payment status (paid or unpaid) of a participant. So, declare the<em> ParticipantPD</em> field as boolean data type will meet its purpose.

               boolean ParticipantPD = true;

               or

               boolean ParticipantPD = false;

8 0
3 years ago
Use an ifstream object named indata to read the first three integers from a file called lottowins and write each number to stand
Gemiola [76]

Answer:

int x;

indata.open("lottowins");

indata >> x;

cout << x << endl;

indata >> x;

cout << x << endl;

indata >> x;

cout << x << endl;

indata.close();

4 0
3 years ago
Scrieți un program care citește un număr natural n și determină suma cifrelor divizibile cu 3 ale lui n.
Vika [28.1K]
Sorry I don't understand your question
5 0
3 years ago
Other questions:
  • One type of technology that can verify a person's identity is _____.
    6·2 answers
  • What are 2 ways that technology can negatively impact the environment.
    8·2 answers
  • PLEASE HELP
    6·1 answer
  • What is the sum of each pair of binary integers? (assuming 8-bit register is used)
    5·1 answer
  • Which of the following is the MOST sensitive Personally Identifiable Information (PII) and should be shared cautiously and only
    8·1 answer
  • Hard light is usually not good for filming. True False
    11·2 answers
  • What is the square root of 1600 and 36 ?​
    6·1 answer
  • Mac or PC (need opinions please)<br><br> Why did you choose Mac/PC?
    10·2 answers
  • After you have located a program name from the Start menu, in order to create a shortcut on the desktop.
    8·1 answer
  • PLEASE HELP!
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!