Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C Compiler.
- Code, Compile, Run and Debug C program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <stdio.h>
- int main()
- {
- int a,b,c,tmp;
- scanf("%d%d%d", &a, &b,&c);
- if ((a+b<=c)||(a+c<=b)||(b+c<=a)){
- printf("NO\n");
- }
- else{
- printf("YES\n");
- if(a>=b){
- tmp;
- tmp=a;
- a=b;
- b=tmp;
- }
- if (a>=c){
- a>=c;
- c=tmp;
- }
- if(b>=c) {
- b=c;
- c=tmp;
- }
- if (c*c==a*a+b*b)
- {
- printf("Pravoagolen e\n");
- float P;
- P=(float)a*b/2;
- printf("ploshtinata e %.2f\n" ,P);
- }
- else {
- printf("Ne e Pravoagolen\n");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement