Answer:
A Sentinel is a special value that cannot be mistaken as a member of a list of data items and signals that there are no more data items to be processed.
Explanation:
The sentinel value is a form of data (in-band) to identify the end of the data when there is no out-of-bound data provided.
The value should picked in a way that is different and unique from all legal data values.
C or 3 system software kinda like firmware internally programmed on your keyboard
import java.util.Scanner;
public class polygon {
/** Main Method */
public static void main(String[] args) {
Scanner input = new Scanner(System.in); // Create a Scanner
// Prompt the user to enter the number of sides
// and the side of a regular polygon
System.out.print("Enter the number of sides: ");
int n = input.nextInt();
System.out.print("Enter the side: ");
double side = input.nextDouble();
// Display the area of the regular polygon
System.out.println("The area of the polygon is " + area(n, side));
}
/** Method area computes and returns the area of a regular polygon */
public static double area(int n, double side) {
return (n * Math.pow(side, 2) / (4 * Math.tan(Math.PI / n)));
}
}
I'm not sure of the problem that you had in the first place, but I can point out that in your "bigger" method, if a number is greater than one then it is bigger, however the else statement says that the number *can* also be equal[==] to the second argument, so for example bigger(1,1) it would check if 1 > 1 and return false, so it will return that b[the second 1] is bigger! Hope this helps :D
Answer:
import math
angle = float(input('Enter Angle: '))
shadowLength = float5(input('Enter Shadow Length: '))
tree_height = math.tan(angle)*shadowLength
print('Tree Height = {}'.format(tree_height))
Explanation:
From the equation given, the first step is to derive the equation for calculating the Tree Height.

In order to calculate the tangent of an angle, the math module has to be imported. math module allows the program to perform advanced math operations.
The program then prompts the user to input values for angle and shadow length.
The inputted values are converted to floats and used in the equation that was derived for Tree height.
Three height is evaluated and the result is printed to the screen