Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java program Q5. What is the output of the following code if number is 14, 15, or 30? if (number % 2-0) System.out.println if (number
Java program
Q5. What is the output of the following code if number is 14, 15, or 30? if (number % 2-0) System.out.println if (number % 2-0) System.out-println numberis even") Cnumber is even) if (number % 5 ". O) System.out.println else if (number % S "" 0) System,out printin (number s multiple of s numberis multiple of (bi Q6. Write conditional expression that returns-1 or 1 randomly. Q7. Write an if statement that assigns tox if y is greater than 0.? Q8. W rte an if statement that increases pay by 3% if score is greater than 90, otherwise increases pay by 1%? 09. Rewrite the following conditional expressions using if-else statements. a. score (x> 10)? 3 scale: 4 * scale; b. System.out.println((number % 3.: 0)?i:j)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started