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
The endocrine system is composed of many parts of the body.<br> a)True<br> b)False
Finger [1]
It is a) true because its compouse by organs and body tissues
4 0
2 years ago
Read 2 more answers
Joel has left his computer unattended while answering a phone call . A TV repairer in his house tries to surf through the applic
Triss [41]
<span>Joel is a victim of a security breech. By leaving his computer unattended and not locked, he allowed for another person to use his credentials to access (or attempt) to access information that would otherwise be restricted to him. The fact that the unauthorized person did not find the information he was seeking does not minimize the risk.</span>
5 0
2 years ago
What refers to a pleasing arrangement of colors that creates a sense of balance or equilibrium in an image? _____ refers to a pl
Nina [5.8K]

Answer:

The word is " Harmony"

In Art, Harmony is the balance. It is one of the seven principles of Art.

It is the delightful way the  parts are organised, which creates a balanced view, the “Visual equilibrium” .

Harmony is in the music, poem, colours and  even in the  food. Balance give us a pleasant  feeling of equilibrium.

8 0
2 years ago
Read 2 more answers
Desirable characteristics of designs include:
polet [3.4K]

Answer: High cohesion

Explanation: Cohesion in general refers to make a couple of the functions or characteristics to share the functions and content . In the field of computer science , cohesion is the best characteristic that can be included in the design because it connect the  various software so that they can share the responsibilities , function and can achieve better output through this. Thus high cohesion is the most preferred factor.

8 0
3 years ago
Which of the following tools enables users to connect to a remote computer, including servers with no interaction required from
musickatia [10]

Answer:

Option (A) i.e., Remote Desktop is the correct answer to the following question.

Explanation:

The following option is correct because the remote desktop is an application or software which connects your computer to another system through the internet from anywhere and we can also connect with each other without the internet but in a range.

<u>Steps to connect in Windows 10</u>:

Step-1: Firstly, start your window and click on the start button.

Step-2: Then, type remote setting in search box.

Step-3: Then, you have to allow the remote access to the system.

Step-4: Then, you have select the Remote Tab which appears in System Properties.

Step-5: Then, you have to click and select the to Allow the Remote Connection.

7 0
3 years ago
Other questions:
  • Help asap. 10 points.
    8·2 answers
  • According to Mintzberg's classification of managerial roles, the role of a(n) ______ is to transmit information received from ou
    7·1 answer
  • How does Hadoop work? It breaks up Big Data into multiple parts so each part can be processed and analyzed at the same time on o
    5·1 answer
  • You type. The word "weather" when you ment "whether" when will the writer or word flag this as a misspelling or a grammar proble
    13·1 answer
  • Develop an sec (single error correction) code for a 16-bit data word. generate the code for the data word 0101000000111001. show
    6·2 answers
  • Universal Containers (UC) has decided to build a new, highly sensitive application on the Force platform. The security team at U
    11·1 answer
  • Write a function listLengthOfAllWords which takes in an array of words (strings), and returns an array of numbers representing t
    14·1 answer
  • What is local technology ? give examples​
    6·1 answer
  • Write the correct statements for the above logic and syntax errors in program below.
    12·1 answer
  • What is an occupation?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!