writting a program

Speed of Sound. Sound travels through air as a result of collisions between the molecules in the air. The temperature of the air affects the speed of the molecules, which in turn affects the speed of sound. The velocity of sound in dry air can be approximated by the formula:

     velocity = 331.3 + 0.61 × T

where Tc is the temperature of the air in degrees Celsius and the velocity is in meters/second.

Write a program that prompts the user for a starting and an ending temperature. Within this temperature range, the program should output the temperature and the corresponding velocity in one degree increments. In the example below, the user entered 0 as the start temperature and 2 as the end temperature:
Enter the starting temperature, in degrees Celsius:  0
Enter the ending temperature, in degrees Celsius:  2
At 0 degrees Celsius the velocity of sound is 331.3 m/s
At 1 degrees Celsius the velocity of sound is 331.9 m/s
At 2 degrees Celsius the velocity of sound is 332.5 m/s

Input Details: The input will consist of two integers, both responses to program prompts.

Output Details: The program uses the prompts shown in the example above. The output percentage must have one digit past the decimal point.

  1. 👍 0
  2. 👎 0
  3. 👁 233
asked by sarah
  1. Sarah, Aymee, Abby:
    I hope you realize that at this forum, we do not write the programme for you.
    Here we give help in different ways,
    - understand the problem in hand,
    - analyze the requirement
    - comment on any proposed solution or help with an algorithm
    - resolve errors of syntax, logic or execution
    - comment on results
    - etc.

    You will be expected to take the first step by telling us what you can achieve, and where your difficulties are.

    I suggest you start with posting a pseudocode for your problem if you would like assistance. If you can post code, that would accelerate your project immensely.

    1. 👍 0
    2. 👎 0

Respond to this Question

First Name

Your Response

Similar Questions

  1. 9th grade

    Use the following Info. At sea level the speed of sound in air is linearly related to air temp. If 35 degrees Celsius sound travels at a rate of 352meters per sec. if 15degrees Celsius sound travels at 340 meters per sec. How

    asked by Kaela on November 15, 2010
  2. physics ..PLEASE HELP ASSIGN DUE SOON :(

    The sound intensity of 1.2x10-12J/m2s is the threshold of hearing for humans. What is the amplitude of the motion of the air molecules if the speed of sound in the air is 343m/s and the density of air is 1.28kg/m^3? Take the

    asked by joane on November 26, 2012
  3. Physics HELP!!

    The sound intensity of 1.2x10-12J/m2s is the threshold of hearing for humans. What is the amplitude of the motion of the air molecules if the speed of sound in the air is 343m/s and the density of air is 1.28kg/m^3? Take the

    asked by rory on November 24, 2012
  4. Physics

    A hammer taps on the end of a 8.13m long metal bar at room temperature. A microphone at the other end of the bar picks up two pulses of sound, one that travels through the metal and one that travels through the air. The pulses are

    asked by rory on November 21, 2012
  5. Physics - Sound

    A sound wave travels in air at a frequency of 500 Hz. If part of the wave travels from air into water, does its frequency change? Does its wavelength change? Note that the speed of sound in air is about 340 m/s, whereas the speed

    asked by Sam on January 26, 2009
  6. physics

    A bat emits a sound whose frequency is 83.6 kHz. The speed of sound in air at 20.0 oC is 343 m/s. However, the air temperature is 36.0 oC, so the speed of sound is not 343 m/s. Assume that air behaves like an ideal gas, and find

    asked by Anonymous on January 21, 2013
  7. Physics

    A bat emits a sound whose frequency is 83.2 kHz. The speed of sound in air at 20.0 oC is 343 m/s. However, the air temperature is 40.5 oC, so the speed of sound is not 343 m/s. Assume that air behaves like an ideal gas, and find

    asked by Orla on January 15, 2013
  8. physics

    A hammer taps on the end of a 4.02 m long metal bar at room temperature. A microphone at the other end of the bar picks up two pulses of sound, one that travels through the metal and one that travels through the air. The pulses

    asked by Anonymous on November 16, 2009
  9. Physics

    A hammer taps on the end of a 4.20 m long metal bar at room temperature. A microphone at the other end of the bar picks up two pulses of sound, one that travels through the metal and one that travels through the air. The pulses

    asked by Gavin on November 22, 2010
  10. physics

    A hammer taps on the end of a 3.32 m long metal bar at room temperature. A microphone at the other end of the bar picks up two pulses of sound, one that travels through the metal and one that travels through the air. The pulses

    asked by Anonymous on November 21, 2008

More Similar Questions