Triangle categorizer -- completely refactored and re-written While reviewing a C question I started writing my own implementation and in no time I had a completely refactored completely different implementation. As the asker is learning I did not want to post it, instead I ask you for further review and possibilities of improvement.

#include &lt;stdio.h&gt;
#include &lt;stdbool.h&gt;

int get_side(name) {
    printf("Side-%d has value: ", name);
    int value; scanf("%d", &amp;value);
    return value;
}

bool is_valid_triangle(side_1,side_2,side_3) {
    bool all_positive = side_1 &gt; 0 &amp;&amp; side_2 &gt; 0 &amp;&amp; side_3 &gt; 0;
    bool correct_sized_sides = side_1 + side_2 &gt; side_3 &amp;&amp; \
                               side_2 + side_3 &gt; side_1 &amp;&amp; \
                               side_3 + side_1 &gt; side_2;
    return all_positive &amp;&amp; correct_sized_sides;
} 

bool is_equilater(side_1,side_2,side_3) {
    return (side_1 == side_2 &amp;&amp; side_2 == side_3);
}

bool is_isosceles(side_1,side_2,side_3) {
    return (side_1 == side_2) || (side_2 == side_3) || (side_3 == side_1);
}

bool is_scalen(side_1,side_2,side_3) {
    return ! is_isosceles(side_1,side_2,side_3);
}

const char * triangle_categorizer(side_1,side_2,side_3) {
    if (is_equilater(side_1,side_2,side_3)) {
        return "equilater";
    }

    if (is_isosceles(side_1,side_2,side_3)) {
        return "isosceles";
    }

    if (is_scalen(side_1,side_2,side_3)) {
        return "scalen";
    }
}

int main() {
    int side_1 = get_side(1);
    int side_2 = get_side(2);
    int side_3 = get_side(3);

    if (! is_valid_triangle(side_1,side_2,side_3)) {
        puts("The triangle you intered is invalid!");
        return 1;
    }
    printf("The triangle you entered is %s.\n", \
           triangle_categorizer(side_1,side_2,side_3));
    return 0;
}
A few simple comments:

Spelling:

Triangles are either Isosceles, Equilateral, or Scalene

Also instead of using string literals, replace them with macros like so:

#define EQUILATERAL "equilateral"
#define ISOSCELES "isosceles"
#define SCALENE "scalene"


I commend you on using long names in c, as many c-programmers use 1-2 letter names for things. I might suggest adding comments to complex code, such as mentioning the fact that you are using triangle inequality in your is_valid_triangle function

I would also suggest extending this program to work with non-integers, such as long longs, doubles and the like. In addition, it may be more helpful to a user to pass in coordinates instead of side lengths. That would also allow you to not check if a triangle is valid or not, as technically all 3 point pairs form a triangle (even if it is degenerate).