Question
if n is the number of seconds between lightning and thunder,the storm is n/ Miles away.
write a program that reads the number of seconds between lightning and thunder and report the distance of the storm rounded to two decimal places
write a program that reads the number of seconds between lightning and thunder and report the distance of the storm rounded to two decimal places
Answers
bobpursley
It would be nice if your instructor actually knew the formula based on the speed of sound. To me, it is embarrassing
#include<iostream.h>
#include<conio.h>
int main ()
{
float noosec;
float distmiles;
cout<<"Enter number of sec between lightning and thunder:"<<endl;
cin>>noosec;
distmiles=noosec/5;
cout<<"Distance is:"<<endl;
cout<<distmiles<<endl;
return 0;
}
This is my view to your problem. You can whatsapp me for further query 00923215081005
#include<conio.h>
int main ()
{
float noosec;
float distmiles;
cout<<"Enter number of sec between lightning and thunder:"<<endl;
cin>>noosec;
distmiles=noosec/5;
cout<<"Distance is:"<<endl;
cout<<distmiles<<endl;
return 0;
}
This is my view to your problem. You can whatsapp me for further query 00923215081005
Related Questions
DURING A THUNDER STORM AND LIGHTNING STORM, TO ESTIMATE HOW FAR AWAY THE STORM IS, COUNT THE NUMBER...
In a lightning storm, the number of seconds between the flash and the bang varies directly with the...
Lightning and thunder are generated from a storm cloud at the same time, generating light waves and...
Lightning and thunder are generated from a storm cloud at the same time, generating light waves and...