Simple geometry can compute the height of an object from the the object's shadow length and shadow angle using the formula: tan(angleElevation) = treeHeight / shadowLength. Given the shadow length and angle of elevation, compute the tree height.

Sample program:

#include
#include

int main(void) {
double treeHeight = 0.0;
double shadowLength = 0.0;
double angleElevation = 0.0;

angleElevation = 0.11693706; // 0.11693706 radians = 6.7 degrees
shadowLength = 17.5;

printf("Tree height: %lf\n", treeHeight);

return 0;
}

Respuesta :

ijeggs

Answer:

#include

#include

int main(void) {

double treeHeight = 0.0;

double shadowLength = 0.0;

double angleElevation = 0.0;

angleElevation = 0.11693706;

// 0.11693706 radians = 6.7 degrees

shadowLength = 17.5;

treeHeight =angleElevation * shadowLength

printf("Tree height: %lf\n", treeHeight);

return 0;

}

Explanation:

since we are given the angle of elevation (6.7 degrees) and shadow length (17.5), we simply add the statement treeHeight =angleElevation * shadowLength to compute the tree hieght using the given formular