Multiple Choice
Assuming that the user inputs a value of 30 for the price and 10 for the discount rate in the following code snippet, what is the output?
Scanner in = new Scanner(System.in) ;
System.out.print("Enter the price: ") ;
Double price = in.nextDouble() ;
System.out.print("Enter the discount rate: ") ;
Double discount = in.nextDouble() ;
System.out.print("The new price is ") ;
System.out.println(price - price * (discount / 100.0) ) ;
A) The new price is 30
B) The new price is 20
C) The new price is 27.0
D) The new price is 33.0
Correct Answer:

Verified
Correct Answer:
Verified
Q2: What is the output of the following
Q5: What is the value inside the value
Q6: Which of the following is the
Q8: Which of the following options declares a
Q8: In an airline reservation system, the cost
Q9: What is the output of the following
Q10: What is the output of the following
Q11: Assuming that the user inputs "Joe" at
Q81: Which one of the following statements can
Q111: Which one of the following is a