Question: Q1 asks you to write statements, meaning, lines of code. Q2 and Q5 ask for the output of certain statements.Q3 and Q4 ask for full
Q1 asks you to write statements, meaning, lines of code. oo Turkcell 20:24 1. Write Java statements that accomplish each of the following tasks a) Display the message "Enter an integer:, leaving the cursor on the same line. b) Assign the product of variables b and c to variable a. c) Use a comment to state that a program performs a sample payroll calculation 2. Assuming that x 2 and y-3, what does cach of the following statements display? d) System.out.print fTx-%dKa-.x); e) System.out.printfi.Value of %d + %d is %d%a". x, x, (x + xt f) System.out.printfrx="k g) System.out.printd-9dn,x+y).(y x)) 3. Write an application that displays the numbers I to 4 on the same line, with cach pair of adjacent numbers separated by one space. Use the following techniques: h) Use the Systemout println statement i) Use the System.out.print statement. ) Use the System.out.printf statement. 4. Write an application that asks the user to enter two integers, obtains them from the user and prints the square of each, the sum of their squares, and the difference of the squares (first mumber squared minus the second number squared) and multiplication and division of them. 5. What does the following code print? System out printf in nnn
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
