Opening the reading…
Opening the reading…
PROGRAMMING FUNDAMENTALS › JAVA FUNDAMENTALS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Using a = 17 and b = 5, print the result of +, -, *, /, and % in separate statements with clear labels. Then reset a to 17, demonstrate standalone +a, -a, a++, and a--, and report the quotient and remainder clearly.
OUTPUT
Samplea + b = 22 a - b = 12 a * b = 85 a / b = 3 a % b = 2 +a = 17 -a = -17 a after a++ = 18 a after a-- = 16 quotient = 3 remainder = 2
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.