Velocity = 331.3 + 0.61 × Tc Where Tc is the temperature of the air in degrees Celsius and the velocity is in meters/second. Write a program that allows the user to input a starting and an ending temperature, then, the program asks the user the required increments of temperature to be calculated. The expected output as Figure Q4. Use for loop for the counter control repetition technique in your program and 2 decimal places on each area to be printed. The bold letter in this output is the input entered by the user. Output Console This is a Program to calculate the velocity of sound in dry air Enter starting temperature: 0 Enter ending temperature: 4 Please enter the increment of temperature in Celsius: 0.85 At 0.00 degree Celsius the velocity of sound is 331.30 m/s At 0.85 degree Celsius the velocity of sound is 331.82 m/s At 1.70 degree Celsius the velocity of sound is 332.34 m/s At 2.55 degree Celsius the velocity of sound is 332.86 m/s At 3.40 degree Celsius the velocity of sound is 333.37 m/s Enter Y- To Repeat - Others to Exit Enter starting temperature: 12 Enter ending temperature: 15 Please enter the increment of temperature in Celaius: 0.57 At 12.00 degree Celsius the velocity of sound is 338.62 m/s At 12.57 degree Celsius the velocity of sound is 338.97 m/s At 13.14 degree Celsius the velocity of sound is 339.32 m/s At 13.71 degree Celsius the velocity of sound is 339.666 m/s At 14.28 degree Celsius the velocity of sound is 340.01 m/s At 14.85 degree Celsius the velocity of sound is 340.36 m/s Enter Y- To Repeat - Others to Exit IN

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

C++

Sound travels through the air because 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 x Tc
Where Tc is the temperature of the air in degrees Celsius and the velocity is in meters/second. Write a program that allows the user to input a starting and an ending temperature, then, the program asks the user the required increments of temperature to be calculated. The expected output is
as Figure Q4. Use for loop for the counter control repetition technique in your program and 2 decimal places on each area to be printed. The bold letter in this output is the input entered by the user.
Output Console
This is a Program to calculate the velocity of sound in dry air
Enter starting temperature: 0
Enter ending temperature: 4
Please enter the increment of temperature in Celsius: 0.85
At 0.00 degree Celsius the velocity of sound is 331.30 m/s
At 0.85 degree Celsius the velocity of sound is 331.82 m/s
At 1.70 degree Celsius the velocity of sound is 332.34 m/s
At 2.55 degree Celsius the velocity of sound is 332.86 m/s
At 3.40 degree Celsius the velocity of sound is 333.37 m/s
Enter Y - To Repeat - Others to Exit
Y
Enter starting temperature: 12
Enter ending temperature: 15
Please enter the increment of temperature in Celsius: 0.57
At 12.00 degree Celsius the velocity of sound is 338.62 m/s
At 12.57 degree Celsius the velocity of sound is 338.97 m/s
At 13.14 degree Celsius the velocity of sound is 339.32 m/s
At 13.71 degree Celsius the velocity of sound is 339.66 m/s
At 14.28 degree Celsius the velocity of sound is 340.01 m/s
At 14.85 degree Celsius the velocity of sound is 340.36 m/s
Enter Y - To Repeat - Others to Exit
N
Transcribed Image Text:Sound travels through the air because 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 x Tc Where Tc is the temperature of the air in degrees Celsius and the velocity is in meters/second. Write a program that allows the user to input a starting and an ending temperature, then, the program asks the user the required increments of temperature to be calculated. The expected output is as Figure Q4. Use for loop for the counter control repetition technique in your program and 2 decimal places on each area to be printed. The bold letter in this output is the input entered by the user. Output Console This is a Program to calculate the velocity of sound in dry air Enter starting temperature: 0 Enter ending temperature: 4 Please enter the increment of temperature in Celsius: 0.85 At 0.00 degree Celsius the velocity of sound is 331.30 m/s At 0.85 degree Celsius the velocity of sound is 331.82 m/s At 1.70 degree Celsius the velocity of sound is 332.34 m/s At 2.55 degree Celsius the velocity of sound is 332.86 m/s At 3.40 degree Celsius the velocity of sound is 333.37 m/s Enter Y - To Repeat - Others to Exit Y Enter starting temperature: 12 Enter ending temperature: 15 Please enter the increment of temperature in Celsius: 0.57 At 12.00 degree Celsius the velocity of sound is 338.62 m/s At 12.57 degree Celsius the velocity of sound is 338.97 m/s At 13.14 degree Celsius the velocity of sound is 339.32 m/s At 13.71 degree Celsius the velocity of sound is 339.66 m/s At 14.28 degree Celsius the velocity of sound is 340.01 m/s At 14.85 degree Celsius the velocity of sound is 340.36 m/s Enter Y - To Repeat - Others to Exit N
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education