Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>;
- #include <cmath>;
- #define PI 3.14159265
- using namespace std;
- double STORONA(int a, int b, double alpha,double &result)
- {
- result = sqrt(a*a + b*a - 0.5*a*b*cos(alpha*PI/180));
- return result;
- }
- int main()
- {
- int a, b;
- double alpha, c;
- cout << "Enter a,b,alpha";
- cin >> a >> b >> alpha;
- c=STORONA(a, b, alpha, c);
- cout << "c=" << c;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment