Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. double vi, vf, c, d, g , f, x, u;
  10.  
  11. x=pow(vf,2)+2*c*d*g*f;
  12. vi=sqrt(x);
  13.  
  14. cout<<"type 1 for metric 2 for us units"<<endl;
  15. cin>>u;
  16. if (u==1)
  17.  
  18. vf=50;
  19. d=200;
  20. f=.14;
  21. c=12.96;
  22. g=9.81;
  23. cout<< "speed before skid"<<vi<<"km/hr"<<endl;
  24.  
  25. else-if (u==2)
  26. vf=40;
  27. d=400;
  28. f=.145;
  29. c=.4649;
  30. g=32.2;
  31. cout<< "speed before skid"<<vi<<"mi/hr"<<endl;
  32.  
  33. else
  34. cout<<"select again"<<endl;
  35. )
  36.  
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement