Answer to Question #188237 in C++ for ayla

Question #188237

The following formula is used to calculate between three values:


-Distance in Kilometer, KM

- Time in Hour, H

-Speed in KM/H


Determine the car’s speed based on the related input value using the following table. using selection.


speed indicator


<=110 KM/H okay

>110 KM/H fast



1
Expert's answer
2021-05-02T12:52:39-0400
#include<iostream>
using namespace std;
void main()
{
float speed,distance,time;
cout<<"enter the distance (km)";
cin>>distance;
cout<<"enter the time(t)";
cin>>time;
speed=distance/time;
cout<<"speed is"<<speed;
if(speed<=110)
{
cout<<"OKAY";
}
elseif(speed>110)
{
cout<<"fast";
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS