The trouble is you think you have time. Your success depends on how you utilize your time.

C++ program which prints velocity by taking input of distance and time.

How to write a C++ program which takes distance and time as input and print velocity.

#include<iostream>
using namespace std;
int main()
{ cout<<"www.moznum.blogspot.com"<<endl<<endl;

float distance,time,velocity;
cout << "Enter the distance " <<endl;
cin >> distance;
cout << "Enter the time " <<endl;
cin >> time;
velocity = distance/time;
cout << "Velocity is " << velocity <<endl;

return 0;
}

1 comment:

  1. Thank you so much for sharing this great blog.Very inspiring and helpful too.Hope you continue to share more of your ideas.I will definitely love to read. velocity calculator

    ReplyDelete