Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- double a, b, c;
- scanf ("%g%g%g", &a, &b, &c);
- printf ("a");
- if ((a == b) || (a == c))
- printf ("isosceles");
- if ((a==b) && (a ==c))
- printf ("equilateral");
- if ((a > b) && (a > c)) {
- if ((pow(a,2) == pow(b,2) + pow(c,2)))
- printf ("right-angled")
- else if (pow(a,2)> pow(b,2) + pow(c,2))
- printf ("obtuse-angled"); }
- if ((b > a) && (b > c)) {
- if ((pow(b,2) == pow(a,2) + pow(c,2)))
- printf ("right-angled")
- else if ((pow(b,2)> pow(a,2) + pow(c,2)))
- printf ("obtuse-angled"); }
- if ((c > b) && (c > a)) {
- if ((pow(c,2) == pow(b,2) + pow(a,2)))
- printf ("right-angled")
- else if ((pow(c,2)> pow(b,2) + pow(a,2)))
- printf ("obtuse-angled"); }
- printf ("triangle");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement