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:
Verified
Q33: Which of the following options is valid
Q34: What is the output of the following
Q35: What is the output of the following
Q36: What output is produced by these statements?
Q39: What is the output of the following
Q40: Assuming that the user inputs "Joe" at
Q43: What is the value of Math.abs(-2)?
A)-2
B)0
C)2
D)4
Q43: What (if any) type of error occurs
Q52: Consider the following division statements:
I.22 / 7
II.22.0
Q103: Which of the given statements generates the
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