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
Morgarella [4.7K]
2 years ago
15

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.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:

print('{:.2f} {:.2f} {:.2f} {:.2f} {:.2f}'.format(your_value1, your_value2, your_value3, your_value4, your_value5))

Ex: If the input is:

440
(which is the A key near the middle of a piano keyboard), the output is:

440.00 466.16 493.88 523.25 554.37
Computers and Technology
1 answer:
lesantik [10]2 years ago
8 0

Answer:

In C:

#include <stdio.h>

#include <math.h>

int main(){

   float f0,r,temp;

   r = pow(2.0,1.0/12);

   printf("f0: ");    scanf("%f", &f0);

   temp = f0;

   for(int i = 0; i<=4;i++){

       f0 = f0 * pow(r,i);

       printf("%.2lf ", f0);

       f0 = temp;    }

   return 0;

}

Explanation:

This declares f0, r and temp as float

   float f0,r,temp;

This initializes r to 2^(1/12)

   r = pow(2.0,1.0/12);

This prompts the user for f0

   printf("f0: ");    scanf("%f", &f0);

This saves f0 in temp

   temp = f0;

This iterates the number of keys from 0 to 4

   for(int i = 0; i<=4;i++){

This calculates each key

       f0 = f0 * pow(r,i);

This prints the key

       printf("%.2lf ", f0);

This gets the initial value of f0

       f0 = temp;    }

   return 0;

You might be interested in
Which of the following Internet connectivity technologies enables data to be sent over existing copper telephone lines by sendin
Pani-rosa [81]

Answer:

The answer is B. Digital subscriber line technology

Explanation:

Digital subscriber line or DSL technology is used to transmit digital data over telephone wires.

It makes file sharing possible which includes multimedia data (i.e. transfer of pictures and graphics), and also video and audio conferencing.

DSL uses a reliable medium that prevents packet loss and interruptions. It is also fast.

6 0
3 years ago
30 POINTS!!
bulgar [2K]

Answer:

online

the answer is online

7 0
2 years ago
Multiple Select Which conditions make using an array a better choice than a list? Select 3 options. when your list would contain
zalisa [80]

Answer:

when you have a very large quantities of numeric data values

when efficiency is of great importance

when you will do a great deal of arithmetic calculations

Explanation:

got it right in edg 2021

6 0
2 years ago
A circumstance in which a manager is using company funds for his or her own personal consumption is called _____. a. information
I am Lyosha [343]

Answer: (C)Self-dealing

Explanation: Self -dealing is the illegal act in the corporate sector in which the manager takes the advantage of the position and try to own the funds and money as his own possession rather than giving it to the shareholders and clients. This act causes severe circumstances for the manager such as penalties,termination etc.

Thus, the correct option is option(c).

6 0
3 years ago
A ______ is a device that provides a connection between two lans that use the same protocol, or it can separate them into two se
zaharov [31]

I guess the answer in the blank is Bridge.

A bridge is a device that provides a connection between two LANs that use the same protocol, or it can separate them into two sections.

7 0
3 years ago
Other questions:
  • Why is statistics important?
    6·1 answer
  • Phoebe has to give a permission about recycling. Where should she look while presenting?
    11·1 answer
  • Using the __________ option, you can change the state of a model back to where a particular feature or features weren`t yet crea
    7·1 answer
  • The use of themes in WordPress is a good illustration of what major concept?
    6·1 answer
  • In your own words explain how to add footer and head in a word doc.
    10·1 answer
  • X = 1 if (A = 1 OR B = 1) OR (A = 0 AND B = 1
    7·1 answer
  • Research and build a chroot jail that isolates ssh users who belong to the restrictssh group. (You will also need to create the
    9·1 answer
  • Who tryna trade in gta my psn is xMadOrNawx-_-
    11·2 answers
  • How can random numbers in a range be generated in Java?.
    8·1 answer
  • the human resources department requests a list that contains the number (i.e. count) of orders taken on each date, grouped by th
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!