CJCoding With Joseph
15per day

Print Product with Clear Label

Create two integer variables: price = 12 and quantity = 4. Then calculate the product in a third variable and print exactly:

Total cost: 48

Use System.out.println() for output.

Expected Output:

Total cost: 48
Topics:
Printing
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.