Advertisement
Guest User

Háromszög

a guest
Oct 24th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a,b,c,p=0,q=0,r=0;
  5. scanf("%d" "%d" "%d",&a,&b,&c);
  6. if (a+b>c) p=2;
  7. if (a+c>b) q=3;
  8. if (b+c>a) r=5;
  9. if (p*q*r==30) printf("%d es %d es %d lehetnek egy haromszog oldalai",a,b,c);
  10. else printf("%d es %d es %d NEM lehetnek egy haromszog oldalai",a,b,c);
  11. getch();
  12. return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement