The function "sqrt" accepts an integer value. You are giving it a float. This can be fixed by using the function "sqrtf". The "f" on the end is there because it will accept a float as its parameter, just as "sqrtl" accepts a long integer.
New Code:
C = ( A * A ) + ( B * B ) ;
C = sqrtf (C) ;
And I don't want to confuse you, but it's important to note that it can also be rewritten as:
C = sqrtf ( ( A * A ) + ( B * B ) );
This has to do with the "transitive" property of mathematics, as it applies to computer programming. Essentially, anything that's equivilent, can be restated wherever it applies.
