Answer:
The solution code is written in Java.
- public class Main {
-
- public static void main(String[] args) {
-
- Scanner inNum = new Scanner(System.in);
- System.out.print("Enter number of toss: ");
- int num = inNum.nextInt();
-
- for(int i=0; i < num; i++){
- System.out.println(toss());
- }
- }
-
- public static String toss(){
- String option[] = {"heads", "tails"};
- Random rand = new Random();
- return option[rand.nextInt(2)];
- }
- }
Explanation:
Firstly, we create a function <em>toss()</em> with no parameter but will return a string (Line 14). Within the function body, create an option array with two elements, "heads" and "tails" (Line 15). Next create a Random object (Line 16) and use <em>nextInt()</em> method to get random value either 0 or 1. Please note we need to pass the value of 2 into <em>nextInx() </em>method to ensure the random value generated is either 0 or 1. We use this generate random value as an index of <em>option </em>array and return either "heads" or "tails" as output (Line 17).
In the main program, we create Scanner object and use it to prompt user to input an number for how many times to toss the coin (Line 6 - 7). Next, we use the input num to control how many times a for loop should run (Line 9). In each round of the loop, call the function <em>toss() </em>and print the output to terminal (Line 10).
The pressure difference across the sensor housing will be "95 kPa".
According to the question, the values are:
Altitude,
Speed,
Pressure,
The temperature will be:
→ ![T = 15.04-[0.00649(9874)]](https://tex.z-dn.net/?f=T%20%3D%2015.04-%5B0.00649%289874%29%5D)
→ 
→ 
now,
→ ![P_o = 101.29[\frac{(-49.042+273.1)}{288.08} ]^{(5.256)}](https://tex.z-dn.net/?f=P_o%20%3D%20101.29%5B%5Cfrac%7B%28-49.042%2B273.1%29%7D%7B288.08%7D%20%5D%5E%7B%285.256%29%7D)
→
hence,
→ The pressure differential will be:
= 
= 
Thus the above solution is correct.
Learn more about pressure difference here:
brainly.com/question/15732832
Answer:
d) Binary
Explanation:
Binary search is a search algorithm that finds the position of a value in an ordered array. It compares the value with the element in the middle of the array, if they are not equal, half in which the value cannot be eliminated and the search continues in the remaining half until the value is found.
Answer:The awnser is 5
Explanation:Just divide all of it