Post a New Question

writting a program

posted by on .

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.

  • writting a program - ,

    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.

Answer This Question

First Name:
School Subject:
Answer:

Related Questions

More Related Questions

Post a New Question