If you enter 1 2 3, when you run this program, what will be the output?

```
import java.util.Scanner;

public class Test1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter three numbers: ");
double number1 = input.nextDouble();
double number2 = input.nextDouble();
double number3 = input.nextDouble();

// Compute average
double average = (number1 + number2 + number3) / 3;

// Display result
System.out.println(average);
}
}
```

a. 1.0
b. 2.0
c. 3.0
d. 4.0


b. 2.0
(1.0 + 2.0 + 3.0) / 3 is 2.0

Computer Science & Information Technology

You might also like to view...

A(n) __________ is often used to implement a priority queue.

A. array B. heap C. linked list D. stack

Computer Science & Information Technology

Ruby range operator (..) provides the ability to do which of the following?

A. Generate a random number within a specified range B. Display a range of consecutive letters or numbers C. Iterate over a specified range of values D. None of the above

Computer Science & Information Technology

What image type is best suited for a photograph?

a. GIF b. JPEG c. PNG d. SVC

Computer Science & Information Technology

To format a modified block letter, it is necessary to set a left tab at ____________________".

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology