Find time, distance and speed in C++(C Plus Plus)

In this latest tutorial, we will cover the program to find the time, distance and speed in C++(C Plus Plus)

// Find time=distance/speed
#include <iostream>
using namespace std;
int main()
{
int dis,sp;
float t;
cout<<"Enter the distance: ";
cin>>dis;
cout<<"Enter the speed: ";
cin>>sp;
t=dis/sp;
cout<<"The time required is: "<<t<<endl;
}

 

Find time distance speed in C++(C Plus Plus)
Figure: Find time distance speed in C++(C Plus Plus)
Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.