15 lines
509 B
C
15 lines
509 B
C
#include <stdio.h>
|
|
#include <math.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
// TODO: calculate the hypotenuse of the triangle a=9 b=15 c=?
|
|
// using the pythagorean theorem.
|
|
// to do that, you need to use sqrt(n) from the math.h lib, to calculate the square-root
|
|
printf("The hypotenuse of the triangle is: %f", 0.0f /* TODO: replace the 0 with your calculation*/);
|
|
|
|
// if you want to try even more of the math library, try using
|
|
// pow(a,b) instead of the *-operator.
|
|
// a is the base and b is the power.
|
|
}
|