Asked by Given

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

Answers

Answered by bobpursley
It would be nice if your instructor actually knew the formula based on the speed of sound. To me, it is embarrassing
Answered by Umair
#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
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions