fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. float a,b,c;
  5.  
  6. printf("enter three sides of triangle");
  7. scanf("%f,%f,%f,&a,&b,&c");
  8.  
  9. if((a+b>c)&&(a+c>b)&&(b+c>a)){
  10. printf("the triangle is valid.\n");}
  11.  
  12.  
  13. if (a==b&&b==c){
  14. printf(" the triangle is isosceles.\n");}
  15.  
  16. else if(a==b||b==c||a==c){
  17. printf(" the triangle is equilateral.\n");}
  18.  
  19. else if((a*a+b*b==c*c)||
  20. (a*a+c*c==b*b)||
  21. (b*b+c*c==a*a)){
  22. printf("the traingle is right angles.\n");}
  23.  
  24. else{
  25. printf(" the traingle is scalene.\n");
  26. }
  27. return 0;
  28. }
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
enter three sides of triangle the triangle is isosceles.