answer.
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
bezimeni [28]
2 years ago
13

2.32 LAB: Musical note frequencies On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency o

f 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 by executing cout << fixed << setprecision(2); once before all other cout statements. Ex: If the input is: 440.0 (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:
Maurinko [17]2 years ago
7 0

Answer:

#include<iostream>

#include<iomanip>

#include<cmath>

using namespace std;

int main()

{

float f0;

cout<<"Initial Frequency: ";

cin>>f0;

for(int n = 1; n<=5;n++)

{

 cout<<f0<<setprecision(2);

 f0 = f0 * pow(2.0,1.0/12);

 cout<<" ";

}

 

return 0;

}

Explanation:

The programming language is not stated; However, one can easily deduce that the program is to be written using C++

The following libraries enable the program to make use of some built in functions

<em>#include<iostream> </em>

<em>#include<iomanip> </em>

<em>#include<cmath> </em>

using namespace std;

int main()

{

This line declares the initial frequency as float

float f0;

This line prompts user for input

cout<<"Initial Frequency: ";

This line gets user input

cin>>f0;

The following iteration calculates and prints the frequency for thenexr 4 keys

<em>for(int n = 1; n<=5;n++) </em>

<em> { </em>

<em>  cout<<f0<<setprecision(2); </em>

<em>  f0 = f0 * pow(2.0,1.0/12); </em>

<em>  cout<<" "; </em>

<em> }  </em>

return 0;

}

You might be interested in
Seneca has just applied conditional formatting and realizes that she has made a mistake. Which action should she take to fix the
Mama L [17]

Answer:

its b

Explanation:

on edg

3 0
1 year ago
Read 2 more answers
The elements of an integer-valued array can be set to 0 (i.e., the array can be cleared) recursively as follows: An array of siz
dangina [55]

Answer:

The method definition to this question can be given as:

Method definition:

public void clear(int[] arr, int num) //define method clear.

{

   if (num == 0) //if block

{

       return 0;  return value.

}

else //else block

{

 arr[num - 1] = 0; //assign value in arr.

return arr[];  //return value.

}

}

clear(arr, num - 1);   //calling

Explanation:

The description of the above method definition as follows:

  • Firstly we define a method that is "clear" that does not return any value because its return type is "void". This method accepts two integer variables that are "arr[] and num" where arr[] is an array variable and num is an integer variable.
  • Inside a method, we use a conditional statement in if block we check that num variable value is equal to 0. if this condition is true so, it will return 0 otherwise it will go to else block in else block it will assign value in variable arr[num-1] that is "0" and return arr value.

4 0
2 years ago
Gwen recently purchased a new video card, and after she installed it, she realized she did not have the correct connections and
g100num [7]

Answer:

A. 8-pin PCI-E connector.

F. 6-pin PCI-E connector.

Explanation:

The video card is a peripheral hardware component in a computer system that is used to run videos and graphic files, providing the required memory, runtime and bandwidth.

The PCI-e or peripheral component interconnect express is a connector or expansion slot used specifically for adding and powering video cards on a computer system.

7 0
2 years ago
Identify the articulation site that allows us to nod our head ""yes"".
Luden [163]

Answer:

Occipital bone-atlas

Explanation:

The occipital bone is a bone that covers the back of your head; an area called the occiput. The occipital bone is the only bone in your head that connects with your cervical spine (neck).  The occipital bone surrounds a large opening known as the foramen magnum.

The foramen magnum allows key nerves and vascular structures passage between the brain and spine. Namely, it is what the spinal cord passes through to enter the skull. The brainstem also passes through this opening.

The foramen magnum also allows 2 key blood vessels traversing through the cervical spine, called the vertebral arteries, to enter the inner skull and supply blood to the brain

8 0
2 years ago
Consider the eight bit signed binary number 1110 0101. Convert it to signed decimal from assuming the signed binary number is re
lapo4ka [179]

Answer:

-26

Explanation:

The given binary number is 1110 0101. Also given that the signed binary number is represented using one's compliment.

We begin by computing the 1s complement representation of 1110 0101 by inverting the bits: 00011010

Converting 00011010 to decimal, it corresponds to 26.

So the 1s complement of the original number is 26. This means that the original number was -26.

7 0
2 years ago
Other questions:
  • Which process is used to protect transmitted data in a vpn?
    12·1 answer
  • Which type of broadband internet access involves using cellular data networks? ​?
    13·1 answer
  • In what year were graphical user interfaces (GUIs) pioneered? 1969 1974 1991 2001
    12·2 answers
  • Joe runs a handyman service. He enjoys writing and keeping up on the latest trends. He wants to share this information with his
    7·1 answer
  • Software code is tested, debugged, fixed, verified, and then:
    11·1 answer
  • Consider a router that interconnects three subnets: subnet 1, subnet 2, and subnet 3. suppose all of the interfaces in each of t
    11·2 answers
  • You are trying to appreciate how important the principle of locality is in justifying the use of a cache memory, so you experime
    11·1 answer
  • The Company management has asked that you compare the OSSTMM and the PTES to determine which methodology to select for internal
    13·1 answer
  • A credit card company receives numerous phone calls throughout the day from customers reporting fraud and billing disputes. Most
    10·1 answer
  • Write a function called add_tuples that takes three tuples, each with two values, and returns a single tuple with two values con
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!