Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- double a,b,c,A,B,C;
- scanf("%lf %lf %lf", &A, &b, &C);
- if (A>B && A>C){
- if (B>C){
- a=A;
- b=B;
- c=C;
- }
- else{
- a=A;
- b=C;
- c=B;
- }
- }
- else if (B>C && B>A){
- if (C>A){
- a=B;
- b=C;
- c=A;
- }
- else {
- a=B;
- b=A;
- c=C;
- }
- }
- else if (C>A && C>B){
- if (A>B){
- a=C;
- b=A;
- c=B;
- }
- else {
- a=C;
- b=B;
- c=A;
- }
- }
- if (A>=B+C){
- printf("NAO FORMA TRIANGULO\n");
- }
- if (A*A==(B*B)+(C*C)){
- printf("TRIANGULO RETANGULO\n");
- }
- if (A*A>(B*B)+(C*C)){
- printf("TRIANGULO OBTUSANGULO\n");
- }
- if (A*A<(B*B)+(C*C)){
- printf("TRIANGULO ACUTANGULO\n");
- }
- if (A==B && B==C){
- printf("TRIANGULO EQUILATERO\n");
- }
- if (A==B && C!=B || B==C && A!=C || C==A && B!=A){
- printf("TRIANGULO ISOSCELES");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement