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. Then reset a to 17, apply standalone increment and decrement statements, and print the resulting values.
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
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.