Guest User

Untitled

a guest
Jun 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int speed1;
  7. int speed2;
  8. int totalspeed;
  9. int distance1;
  10. int distance2;
  11. int totaldistance;
  12. float velocity ;
  13.  
  14. speed1 = 10;
  15. speed2 = 20;
  16.  
  17. distance1 = 100;
  18. distance2 = 245;
  19.  
  20. totaldistance = distance2 - distance1;
  21. totalspeed = speed2 - speed1;
  22.  
  23. Velocity = totaldistance / totalspeed;
  24. cout<< velocity << endl;
  25. system("PAUSE");
  26. return 0;
  27. }
Add Comment
Please, Sign In to add comment