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]
3 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]3 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
With the help of ________, the digital version of a document is displayed on the screen for a human viewer to verify letters the
Nostrana [21]

With the help of Intelligent Character Recognition, the digital version of a document is displayed on the screen for a human viewer to verify letters the software cannot read.

6 0
3 years ago
Read 2 more answers
A test for logical access at an organization being audited would include: Group of answer choices Checking that the company has
bogdanovich [222]

Answer:

Testing that super user (SYSADMIN) access is limited to only appropriate personnel.

Explanation:

A test for logical access at an organization being audited would include testing that super user (SYSADMIN) access is limited to only appropriate personnel.

8 0
3 years ago
Consider the efficiency of locating the kth element in a singly-linked list. How does that compare to locating the kth element i
eimsori [14]

Answer:

Finding kth element is more efficient in a doubly-linked list when compared to a singly-linked list

Explanation:

Assuming that  both lists have firs_t and last_ pointers.

For a singly-linked list ; when locating a kth element, you have iterate through a number of k-1 elements which means that locating an element will be done only in one ( 1 ) direction

For a Doubly-linked list : To locate the Kth element can be done from two ( directions ) i.e. if the Kth element can found either by traversing the number of elements before it or after it . This makes finding the Kth element faster because the shortest route can be taken.

<em>Finding kth element is more efficient in a doubly-linked list when compared to a singly-linked list </em>

4 0
2 years ago
\what security countermeasures can you enable on your wireless access point (wap) as part of a layered security solution for wla
dmitriy555 [2]
The security countermeasure that one can enable on a wireless access point as part of the layered solution for WLAN implementations would be to disable 802.1x . It is the one that provides a WEP and is very unsecure. Another is to change the SSID and to set the broadcast of the SSID to off.
5 0
3 years ago
Programs that are embedded in a Web page are called Java ____.
chubhunter [2.5K]

Answer:

applets

Explanation:

Java applets are dynamic programs that can be embedded on a webpage and run on a web browser like internet explorer,firefox or google chrome. The code for applets is developed using java programming language and facilitates interesting and complex display entities to be included as part of the web page. HTML provides a special tag called <Applet> for providing details of the applet.

8 0
3 years ago
Other questions:
  • Create a class named Person that holds the following fields: two String objects for the person’s first and last name and a Local
    5·2 answers
  • What does the do not disturb button do on the iphone?
    12·1 answer
  • In this website/app what are the points for?
    7·1 answer
  • Which is most harmful computer virus define​
    15·1 answer
  • You resurrected an old worksheet. It appears to contain most of the information that you need, but not all of it. Which step sho
    5·1 answer
  • Why Stockholder are interested in the way a company operate?
    12·1 answer
  • 2) Search the Web for two or more sites that discuss the ongoing responsibilities of the security manager. What other components
    15·1 answer
  • Networking and telecommunications technologies, along with computer hardware, software, data management technology, and the peop
    5·1 answer
  • FOR DIGITAL DESIGN/ PHOTOGRAPHY
    5·2 answers
  • In python please:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!