I am making a program that asks the user the length of each side of the triangle and calculates whether or not the side lengths given make a valid triangle. The error is generated on line 24 as you might have seen in the title. I am sorry i am a beginner and thank you in advance Here is the code:
#include <stdio.h>
#include <string.h>
int main(void)
{
bool valid_triangle(float a, float b, float c);
float a1 = get_float("a = ");
float b2 = get_float("b = ");
float c3 = get_float("c = ");
if (valid_triangle(a1, b2, c3) == true)
{
printf("It is a triangle");
}
if (valid_triangle(a1, b2, c3) == false)
{
printf("it is not a triangle");
}
bool valid_triangle(float a, float b, float c)
{
float sum = a + b;
if (sum > c)
{
return true;
}
if (sum < c)
{
return false;
}
if (sum >= 0)
{
return false;
}
}
}```