Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- #define PI 3.14159265
- int main()
- {
- int a,b,c;
- double A,B,C,val,ret1,ret2,ret3;
- val=PI/180;
- printf("Enter Length of Three Sides of a Triangle\n");
- scanf("%d%d%d", &a, &b, &c);
- printf("Enter ANGELS of a Triangle\n");
- scanf("%lf%lf%lf", &A, &B, &C);
- ret1= sin(A*val);
- ret2= sin(B*val);
- ret3= sin(C*val);
- if( (a+ b > c) && (b + c > a) && (c + a > b) )
- {
- if((A+B+C)==180 && A!=0 && B!=0 && C!=0)
- {
- if( ( (double)a/ret1) == ( (double)b/ret2 ) && ( (double)b/ret2) == ( (double)c/ret3 ) )
- {
- printf("The Triangle Is Valid !! ");
- }
- }
- }
- else
- {
- printf("It is an invalid Triangle");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement