Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- #include <stdio.h>
- using namespace std;
- int main()
- {
- double pi = 3.14159265358979323846, a, b, u, c;
- cout << "Vedite dliny A" << endl;
- cin >> a;
- cout << "Vedite dliny B" << endl;
- cin >> b;
- cout << "Ygol mejdu A i B" << endl;
- cin >> u;
- c = sqrt((a*a) + (b*b) - (2 * (a*b)*cos((u*pi) / 180)));
- printf("Ravnostorony-%d\n", (u == 60)? 1 : 0);
- printf("Ravnobedreny-%d\n", ((a == b) || (b == c))? 1 : 0);
- printf("Pryamoygolny-%d\n", (((a*a) + (b*b) == (c*c)) || ((c*c) + (a*a) == (b*b)) || ((c*c) + (b*b) == (a*a)))? 1 : 0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement