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

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

In this latest tutorial, we will cover the following topics;
  1. Find time, distance and speed in C++(C Plus Plus)
    // Find time=distance/speed
    #include <iostream>
    using namespace std;
    int main()
    {
    int dis,sp,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
Researcher, Publisher of International Journal Of Software Technology & Science ISSN: 2616-5325
Instructor, SEO Expert, Web Programmer and poet.
Feel free to contact.