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).
Answer:0.1898 Pa/m
Explanation:
Given data
Diameter of Pipe
Velocity of water in pipe
We know viscosity of water is
Pressure drop is given by hagen poiseuille equation
We have asked pressure Drop per unit length i.e.
Substituting Values
=0.1898 Pa/m
Algorithm of the Nios II assembly program.
- Attain data for simulation from the SW11-0, on the DE2-115 Simulator
- The data will be read from the switches in loop.
- The decimal output is displayed using the seven-segment displays and done using the loop.
- The program is ended by the user operating the SW1 switch
and
The decimal equivalent on the seven-segment displays HEX3-0 is
- DE2-115
- DE2-115_SW11
- DE2-115_HEX3
- DE2-115_HEX4
- DE2-115_HEX5
- DE2-115_HEX6
- DE2-115_HEX7
<h3>The Algorithm and
decimal equivalent on the
seven-segment displays HEX3-0</h3>
Generally, the program will be written using a cpulator simulator in order to attain best result.
We are to
- Attain data for simulation from the SW11-0, on the DE2-115 Simulator
- The data will be read from the switches in loop.
- The decimal output is displayed using the seven-segment displays and done using the loop.
- The program is ended by the user operating the SW1 switch
This will be the Algorithm of the Nios II assembly program .
Hence, the decimal equivalent on the seven-segment displays HEX3-0 is
- DE2-115
- DE2-115_SW11
- DE2-115_HEX3
- DE2-115_HEX4
- DE2-115_HEX5
- DE2-115_HEX6
- DE2-115_HEX7
For more information on Algorithm
brainly.com/question/11623795
Answer:
Marcus would have to take an exam administered by the national council of examiners for engineering and surveying.
Explanation:
Civil engineers design, construct, and maintain projects regarding infrastructure. A civil engineer also looks after the systems in the public and private sectors like roads, buildings, and systems for water supply and sewage treatment.
In order to pursue a career in civil engineering, Marcus aims to work for the city council as a civil engineer. Therefore, he would have to take an exam administered by the national council of examiners for engineering and surveying.
15x -/c/ fb is the answer