← Back to Printing
Question 286
Decimal, Hex, and Octal
Decimal, Hex, and Octal
Using a singleSystem.out.printf, print the number 255 in three bases separated by single spaces: decimal (%d), lowercase hex (%x), and octal (%o). End with%n. The exact output is what is shown in Expected Output. Pass the value 255 three times as arguments.
Expected Output:
255 ff 377= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Printing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.