Answer:
The program to this question can be given as:
Program:
#include <stdio.h> //include header files
#include<math.h>
int main() //main method
{
double treeHeight = 0.0; //declare variables
and assign value
double shadowLength = 0.0;
double angleElevation = 0.11693706;
// (0.11693706 radians = 6.7 degrees) convert number into angle.
shadowLength = 17.5;
treeHeight = shadowLength * tan(angleElevation); //convert number into angle
printf("Tree height: %lf\n", treeHeight); //print value.
return 0;
}
Output:
Tree height: 2.055778
Explanation:
In the above C language program firstly we include the headers. In this header file, we include a (math.h) header file this file helps to use the math function. Then we declare the main method in the main method we declare the variable that is given in the question that are treeHeight, shadowLength , angleElevation. All the variable datatype is double because it stores the floating-point value. Then we apply the formula that is treeHeight = shadowLength * tan(angleElevation). In this formula, the treeHeight variable holds the value. Then we print the variable value for print the double value we use the lf(that is long float).
The process is called booting
Answer:
Following are the Python program to this question: t=float(input("Enter time value in seconds: "))#input time in seconds by user
d = t // (24 * 3600) #calculate day and store in d variable t= t % (24 * 3600)#calculate time and store in t variable h = t // 3600#calculate hour and store in h variable t %= 3600#calculate time and store in t variable m=t // 60#calculate minutes and store in m variable t%= 60#calculate time and store in t variable s = t#calculate second and store in s variable print("day:hour:minute:second= %d:%d:%d:%d" % (d,h,m,s))#print calculated value
Output:
Enter time value in seconds: 1239876
day:hour:minute:second= 14:8:24:36
Explanation:
Description of the above can be defined as follows:
- In the above Python program code an input variable "t" is declared, which uses the input method to input value from the user end.
- In the next step, "d, m, and s" is declared that calculates and stores values in its variable and at the last print, the method is used to print its value.
Answer:
In Performance Monitor, run the System Diagnostics data collector set.