Write a program that calculates the speed of sound (?) in air of temperature T (
ID: 3530954 • Letter: W
Question
Write a program that calculates the speed of sound (?) in air of temperature T (in Fahrenheit). The formula to compute the speed in ft/sec is: a=1086*sqrt((5T+297)/247)Be sure your program does not lose the fractional part of the quotient in the formula shown. Your program should ask the user to enter the current air temperature and repeat until the user wants to quit Making the Fahr Program Interactive - Repetitions). As part of your solution, write a call function that displays instructions to the program user (remember to induce math lib. so as to calculate square of root).Explanation / Answer
#include <stdio.h> #include <math.h> int main (void) { float sound, temperature; printf("Enter a temperature T in fahrenheit: "); scanf("%f", &temperature); sound = 1086 * (sqrt ((5 * temperature + 297) / 247)); printf("When the temperature is %f F, the speed of sound in the air is %f ", temperature, sound); return 0; } Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.