The answer will be... hmmm.. D?
The pseudocode :
Pair MaxiMini(array, sizeof_array)
if sizeof_array = 1
return element as both maximum and minimum
else if sizeof_array = 2
do one comparison to find the maximum and minimum
return that pair
else
# sizeof_array > 2
recursion for maximum and minimum of the left half
recursion for maximum and minimum of the right half
one comparison determines the true max of the two elements
one comparison determines the true min of the two elements
return the pair of maximum and minimum
Answer:
graphic word processing program
import java.util.Scanner;
public class JavaApplication57 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter two numbers:");
int num1 = scan.nextInt();
int num2 = scan.nextInt();
while (num1 <= num2){
if (num1 %2 == 0){
System.out.print(num1+" ");
}
num1+=1;
}
}
}
I hope this helps!