A. by combining similar instructions into groups, which will then execute in parallel
The correct answer is the first one : a. Colour selection
Answer:
Explanation:
The following code is written in Java and like requested prompts the user for a number to continue or a letter to exit. Then loops and keeps adding all of the numbers to the sum variable and adding 1 to the count for each number entered. Finally, it prints the sum and the average using printf and the variables.
import java.util.Scanner;
class Examine1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int sum = 0;
int count = 0;
System.out.println("Enter a number to continue or a letter to exit.");
while(in.hasNextInt()) {
System.out.println("Enter a number:");
sum += in.nextInt();
count += 1;
}
System.out.printf("The sum is %s.%n", sum);
System.out.printf("The average is %s.", (sum / count));
}
}
Answer:
C
Explanation:
Because he's knowledge ,everyone asking he's opinion if i am not wrong.
I hope i did help you on this questions
Def swapArrayEnds( array ):
tmp = array[ len( array ) - 1 ]
array[ len( array ) - 1 ] = array[ 0 ]
array[ 0 ] = tmp