Answer:
Following are the code block in the Java Programming Language.
//define recursive function
public static long exponentiation(long x, int n) {
//check the integer variable is equal to the 0.
if (x == 0) {
//then, return 1
return 1;
}
//Otherwise, set else
else {
//set long data type variable
long q = exponentiation(x, n/2);
q *= q;
//check if the remainder is 1
if (n % 2 == 1) {
q *= x;
}
//return the variable
return q;
}
}
Explanation:
<u>Following are the description of the code block</u>.
- Firstly, we define the long data type recursive function.
- Then, set the if conditional statement and return the value 1.
- Otherwise, set the long data type variable 'q' that sore the output of the recursive function.
- Set the if conditional statement and check that the remainder is 1 and return the variable 'q'.
Answer:
many forms
Explanation:
Polymorphism is a construct in object oriented programming which means multiple forms.For example: Suppose I have a function which performs the add operation on two integers and another function with the same name which concatenates 2 given strings:
- string add ( string a , string b)
The two functions represent polymorphic forms of the add function. The function to be invoked at runtime is determined by the runtime argument type.
For example , add (2,3) will invoke int add ( int a, int b);
Similarly, add("hello","world") will invoke string add ( string a , string b);
Answer:
Multi herramientas
Explanation:
Un kit tecnologico debe contener todas las herramientas necesarias para el trabajo que lo necesites, por ejemplo destornillador magnetico con varias puntas, herramientas para desmontar y por supuesto tener buena claridad para trabajar y alcohol isoprofilico de al menos 90+ para limpiar electronicos.