Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- double calcAcceleration(double theta);
- int main()
- {
- double theta=23.5;
- cout<<"A child on a sleigh is travelling down a frictionless hill with a slope of 23.5 degrees, it is accelerating at a constant rate of: ";
- cout<<calcAcceleration(theta);
- cout<<"m/s^2.\n";
- cout<<"Let's hope that isn't a very high hill.\n";
- return 0;
- }
- double calcAcceleration(double theta)
- {
- double radians = theta/180;
- double a = (9.8*(sin(radians)));
- return a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement