Solved

For the Following Questions, Refer to the Class Defined Below

Question 18

Multiple Choice

For the following questions, refer to the class defined below:
import java.util.Scanner;
public class Questions
{
public static void main(String[ ] args)
{
int x, y, z;
double average;
Scanner scan = new Scanner(System.in) ;
System.out.println("Enter an integer value") ;
x = scan.nextInt( ) ;
System.out.println("Enter another integer value") ;
y = scan.nextInt( ) ;
System.out.println("Enter a third integer value") ;
z = scan.nextInt( ) ;
average = (x + y + z) / 3;
System.out.println("The result of my calculation is " + average) ;
}
}
-Questions33_34 computes


A) The correct average of x, y and z as a double
B) The correct average of x, y and z as an int
C) The average of x, y, and z as a double, but the result may not be accurate
D) the sum of x, y and z
E) the remainder of the sum of x, y and z divided by 3

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions