Answer:
public class Main
{
public static void main(String[] args) {
System.out.println(min(3, -2, 7));
}
public static int min(int n1, int n2, int n3){
int smallest = Math.min(Math.min(n1, n2), n3);
return smallest;
}
}
Explanation:
*The code is in Java.
Create a method named min that takes three parameters, n1, n2, and n3
Inside the method:
Call the method Math.min() to find the smallest among n1 and n2. Then, pass the result of this method to Math.min() again with n3 to find the min among three of them and return it. Note that Math.min() returns the smallest number among two parameters.
In the main:
Call the method with parameters given in the example and print the result
Answer:
a. 2^6, or 64 opcodes.
b. 2^5, or 32 registers.
c. 2^16, or 0 to 65536.
d. -32768 to 32768.
Explanation:
a. Following that the opcode is 6 bits, it is generally known that the maximum number of opcodes should be 2^6, or 64 opcodes.
b. Now, since the size of the register field is 5 bits, we know that 2^5 registers can be accessed, or 32 registers.
c. Unsigned immediate operand applies to the plus/minus sign of the number. Since unsigned numbers are always positive, the range is from 0 to 2^16, or 0 to 65536.
d. Considering that the signed operands can be negative, they need a 16'th bit for the sign and 15 bits for the number. This means there are 2 * (2^15) numbers, or 2^16. However, the numbers range from -32768 to 32768.
I think storm surges cause fro means world "earth" so a storm surge is like a flood SO plates would cause earth quakes and stuff
Answer:
an algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem, based on conducting a sequence of specified actions. A computer program can be viewed as an elaborate algorithm. In mathematics and computer science, an algorithm usually means a small procedure that solves a recurrent problem.
Answer
Procedural programming, Object-oriented programming
Explanation
Procedural programming is a type of computer programming language that specifies a series of well structured steps and procedures within its development period of time. It contains a systematic order of statements, functions and commands to complete a computational task or program. It is centered on creating procedures. While object oriented programming is a programming language that is centered on creating objects rather that actions and data rather than logic.. It has four principles which are inheritance, polymorphism, abstraction and Encapsulation