fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a,b,c;
  5. printf("write first side of tringle\n");
  6. scanf("%d", &a);
  7. printf("write second side of tringle\n");
  8. scanf("%d", &a);
  9. printf("write third side of tringle\n");
  10. scanf("%d", &c);
  11. if(a == b && b == c){
  12. printf("triangle is equilateral");
  13. }
  14. else if (a == b || a == c || b == c){
  15. printf("the triangle is isosceles");
  16. }
  17. else {
  18. printf("the triangle is scalene");
  19. }
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5320KB
stdin
6
6
9
stdout
write first side of tringle
write second side of tringle
write third side of tringle
the triangle is scalene