Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- #include <ctype.h>
- #include <string.h>
- #include <time.h>
- int main(){
- int a, b, c;
- scanf("%d%d%d", &a, &b, &c);
- if(((a + b) > c) && ((a + c) > b) && ((b + c) > a)){
- if((a * a == (b * b + c * c)) || (b * b == (a * a + c * c)) || (c * c == (a * a + b * b))){
- puts("right triangle");
- }
- else if((a * a > (b * b + c * c)) || (b * b > (a * a + c * c)) || (c * c > (a * a + b * b))){
- puts("obtuse triangle");
- }
- else{
- puts("acute triangle");
- }
- if((a == b) && (b == c)){
- puts("equilateral triangle");
- }
- else if((a == b) || (b == c) || (a == c)){
- puts("isosceles triangle");
- }
- }
- else{
- puts("no triangle");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement