Solved

Assuming That the User Inputs a Value of 25000 for the Pay

Question 32

Multiple Choice

Assuming that the user inputs a value of 25000 for the pay and 10 for the bonus 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 pay: ") ;
Double pay = in.nextDouble() ;
System.out.print("Enter the bonus rate: ") ;
Double bonus = in.nextDouble() ;
System.out.println("The new pay is " +
(pay + pay * (bonus / 100.0) ) ) ;
}


A) The new pay is 25000
B) The new pay is 25100
C) The new pay is 27500
D) The new pay is 30000

Correct Answer:

verifed

Verified

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents