Assuming that the user provides 99 as input, what is the output of the following code snippet?
Int a;
Int b;
Scanner in = new Scanner(System.in) ;
System.out.print("Please enter a number: ") ;
B = in.nextInt() ;
If (b > 300)
{
A = b;
}
Else
{
A = 0;
}
System.out.println("a: " +A) ;
A) a: 0
B) a: 99
C) a: 100
D) a: 300
Correct Answer:
Verified
Q2: Which of the following statements is true
Q9: Which of the following statements is (are)
Q9: What kind of operator is the <=
Q10: Suppose one needs an if statement to
Q12: Which of the following statements is correct
Q13: What can be done to improve the
Q14: A store provides 10 percent discount on
Q17: Which of the following operators is used
Q18: What are the two parts of an
Q19: The operator !> stands for
A)not less than.
B)not
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents