Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int speed1;
- int speed2;
- int totalspeed;
- int distance1;
- int distance2;
- int totaldistance;
- float velocity ;
- speed1 = 10;
- speed2 = 20;
- distance1 = 100;
- distance2 = 245;
- totaldistance = distance2 - distance1;
- totalspeed = speed2 - speed1;
- Velocity = totaldistance / totalspeed;
- cout<< velocity << endl;
- system("PAUSE");
- return 0;
- }
Add Comment
Please, Sign In to add comment