Multiple Choice
Assuming that the user inputs a value of 25 for the price and 10 for the discount rate in the following code snippet, what is the output? public static void main(String[] args)
{
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.println("The new price is " +
Price - price * (discount / 100.0) ) ;
}
A) The new price is 25
B) The new price is 15
C) The new price is 22.5
D) The new price is 20.0
Correct Answer:

Verified
Correct Answer:
Verified
Q5: Which statement is true about variable names
Q94: Which of the following statements places input
Q99: What is the output of the following
Q100: Which of the following is the mathematical
Q101: Assume the following variables have been declared
Q102: Which one of the following statements defines
Q106: What is the output of this code
Q107: Which one of the following variables is
Q108: What output is produced by these statements?
Q113: How do you extract the first 5