Import java.util.Scanner;
class hola
{
public static void main(String[]args)
{
Scanner x=new Scanner(System.in);
int a=x.nextInt();
int b;
if(a>20&&a<100)
{
b=a%12;
if(b%2==0){
System.out.print("es par"+b);
}
else{
System.out.print("es impar"+b);
}
}
}
}
<span>Synthesizers. The term synthesizer is derived from the word synthesis which means to combine various elements to create something new. Instruments such as the trumpet, guitar, drums, etc. are molded and shaped to make a specific sound. With the use of electronic synthesizers sounds can be combined or modified to create a unique, new sound.</span>
Answer:
Following are the code to the given question:
int power(int x, int n)//defining a method power that accepts two integer parameters
{
if (n == 0)//defining if block to check n equal to 0
{
return 1; //return value 1
}
else//defining else block
{
x = x * power(x, --n); //use x variable to call method recursively
}
return x; //return x value
}
Explanation:
In the above-given code, a method power is defined that accepts two integer variable in its parameter, in the method a conditional statement is used which can be defined as follows:
- In the if block, it checks "n" value, which is equal to 0. if the condition is true it will return value 1.
- In the else block, an integer variable x is defined that calls the method recursively and return x value.
It does not matter its is just a view and is not required to store data